- After cloning the repo open the folder in the terminal and run the following command to install all packages
npm i
- Rename
.env.example
to.env
- Open psql terminal.
- Create user
CREATE USER fwd WITH PASSWORD 'fwd' SUPERUSER;
- Create A Database
CREATE DATABASE store OWNER fwd ENCODING UTF8;
- Crate testing database
CREATE DATABASE store_test OWNER fwd ENCODING UTF8;
- The database is running on host
localhost
and port5432
- The server is running on port
3000
- Bcrypt paper is
secret
and rounds =8
- JWT secret =
JWTSECRET
- Build the project from
TypeScript
toJavaScript
and save it to/build
npm run build
- Starting the final build of the project
npm run start
- Running the
TypeScript
server in development withnodemon
npm run dev
- Getting linting errors using
eslint
npm run lint
- Fixing linting errors using
eslint
npm run lint:fix
- Formatting the project using
prettier
npm run format
- Run migrations of the database
npm run db:up
- Reset the database
npm run db:down
- Building the project and testing the specs on a test database
npm run test