-
install all packages using
npm i
script in the terminal -
create a .env file containing all the environment variables needed for this project such as ( POSTGRES_HOST POSTGRES_DB, POSTGRES_TEST_DB, POSTGRES_USER, POSTGRES_PASSWORd, ENV, BCRYPT_PASSWORD, SALT_ROUNDS, TOKEN_SECRET )
-
create your own local DataBase using postgresSql and provide its data in the database.json file and the .env file.
-
run
db-migrate up
to apply all the database tables to your copy -
to connect to the app you should first open the server by using the command
npm run start
and use the URL stated in the console to connect to the app
- the port on which this api is run is 3000 and it was tested in the local machine only.
- the database Port is 5432.
-complete CRUD operation for products and users tables -complete endpoints for both of them -Adding table cart that is a many to many relationship of products and users -using jwt for authenticating
-npm run start
(to begin the server);
-npm run test
(to apply our tests);
-the project is not a final draft for sure and I am willing to do it all over agai if that's what it takes.