- Use node 14. You can install different versions of node using nvm
- Install the dependencies
npm install
- Create a database using a GUI or the command line. The command
psql -U<YourUserName> -c "CREATE DATABASE <YourDatabaseName>"
should do the trick. - Run the migrations
node db/migrations/run.js
. This will create all the tables needed by the app. Whenever you add a new table, you will need to add a migration file todb/migrations
. See the existing file as an example. - Start the app:
npm start
. This already has nodemon baked in so you don't have to worry about manually restarting when code changes.
monicao/express_starter_app
Simple express starter app for learning. Uses minimal dependencies.
JavaScript