- Postgres for the database
- Node/Express for the application logic
- dotenv from npm for managing environment variables
- db-migrate from npm for migrations
- jsonwebtoken from npm for working with JWTs
- jasmine from npm for testing
migrations all database migrations used to create data-base schema.
src/ all source code, which contains.
modelsfor all function models used for database quiries.handlersmodel handlers that recieves the requests and send respones as well as status codes.routesthe configuration for all routes.middlewareauthentication middleware.testsall test suits.server.tsmain server configuration.database.tsdatabase configuration.
yarn or npm install to install required packages.
yarn start or npm run start will run nodemon and start the server and the database on the ports defined in environment variables.
Start by creating two data-bases, a data-base for testing and another for development.
psql -U username
# Enter Password
CREATE DATABASE databaseName;
CREATE DATABASE testDatabaseName;
Then run
db-migrate up to create the schema.
yarn test or npm run test