This project is part of the Udacity Backend Javascript Nanodegree
Create .env
file in the root directory
PORT=3000
ENV=dev
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5432
POSTGRES_USER=storefront_user
POSTGRES_DB=storefront_db
POSTGRES_DB_TEST=storefront_db_test
POSTGRES_PASSWORD=password123
BCRYPT_PASSWORD=breaking-bad-1234
SALT_ROUNDS=10
TOKEN_SECRET=hello-from-token-secret
This is an list of needed instructions to set up your project locally, to get a local copy up and running follow these instructuins.
Prettier
npm run prettier
Lint
npm run lint
Start server
npm run start
Start server & tests
npm run test
- Clone the repository
$ git clone [https://github.com/AbdelrahmanTolba/Storefront-Backend.git]
- Navigate to repository directory
$ cd Storefront-Backend
- Install dependencies
$ npm install
- Create 2 databases
CREATE DATABASE storefront_db;
CREATE DATABSE storefront_db_test;
- Running on development mode
$ npm run start
- Running Tests
$ npm run test