Terminal 1 nodemon server.js
Terminal 2 psql from the PostgreSql desktop app
-
Create a new database
-
'CREATE DATABASE db_name;'
-
Delete a database
-
'DROP DATABASE db_name;'
-
Show a list of databases
-
'\list or \l'
-
Use a database
-
'\connect db_name or \c db_name'
-
Show a list of tables
-
'\dt'
-
Describe a table
-
'\d+ "db_name"'
-
To get all items
-
Use Postman
-
Create new product
- Add in your models in the server/models/ folder
- Follow examples in folder for help
- Add in routes in your server/server.js file
- Follow examples in the file for help
- Modify package.json to inclue db of your choice
- Add in database names to the config/config.json file
- Build front end using framework of your choice
- Separate express routers and database calls
- Start database server
- nodemon server.js