- Download and install PostgreSql
- Download and install node.js
- in this file you will find all the routes in the api and how to create user and token to use for all the rest of the routes
- after downloading PostgreSql and install it
open the default postgres user by running this command in the terminal
psql -U postgres
and write your password u created in the installation.
after connecting to the default postgres user
run this command
CREATE DATABASE store_dev;
CREATE DATABASE store_test;
now you are ready to start the project
build the server and connect to the database
npm run initialize
- Start the server to start using the api
npm run jsStart
-
you need to create .env file and put this inside it PORT = 3000
ENV = dev
POSTGRES_HOST = localhost
POSTGRES_PORT = 5432
POSTGRES_DB = store_dev
POSTGRES_DB_test = store_test
POSTGRES_USER = postgres
POSTGRES_PASSWORD = 123123pass
BCRYPT_PASS = ThisIsTotalyNotAPassWord
TOKEN_PASS = ThisIsTotalyNotAPassWord
SALT_ROUNDS = 11
server running on port 3000
PSQL running on port 5432
npm run migration:stop
npm run migration:stop
npm run unit_test
npm run clean
npm run dev
npm run build