Ecommerce store backend api built using NodeJS.
Unit Tests using Jasmine
- Run
yarn
in the project directory - Create a
.env
file in the project with the format
POSTGRES_HOST=127.0.0.1
POSTGRES_DB=shopping_api_dev
POSTGRES_TEST_DB=shopping_api_test
POSTGRES_USER=pg_user
POSTGRES_PASSWORD=pg_password
BCRYPT_PASSWORD=verysecrettoken
SALT_ROUNDS=10
ENV=dev
- Make sure
dev
andtest
postgres dbs exist in your installation of PostgreSQL and your db username and password match in the.env
file above. - The api runs on port
3000
while the database runs on the default postgres port5432
- Simply run
yarn watch
or alternatively
yarn build
followed byyarn start
to run the server
- Follow step 1 to step 3 above.
- Run
yarn test
in the dir to run tests.