Overview
NoteThis guide will be using VS Code as the IDE, but you may use your preferred IDE.
Use the sample repository
We offer a sample repository that can be used as an educational resource. It is an Express API that can be run locally with sampleSELECT
, INSERT
, UPDATE
, and DELETE
statements mapped to the proper API endpoints.
To follow along, you’ll need the following:
- A PlanetScale account, as well as knowing how to create a database.
- The PlanetScale CLI is installed on your computer, which will be used to seed data.

travel_db
. Click “Create database”. Wait for the database to finish initializing before moving on.




scripts
folder and run the seed_database.sh
script to populate a small database simulating a travel agency.
NoteIf you are using Windows, run this command through the Windows Subsystem for Linux (WSL)
.env
in the root of the project and paste in the sample provided from PlanetScale that you copied earlier.
To run the project, run the following commands from the root of the project.
tests.http
file is designed to work with the VS Code Rest Client plugin, but can be used as a reference when testing with the tool of your choosing. If you are using the plugin, you may click the “Send request” button that appears above each request to see the API in action.

execute
function is logged out for review.