Skip to content

LibenHailu/store-front-backend

Repository files navigation

Storefront Backend Project

This is a backend for store front made with node and Typescript

To access it follow the instraction below after the setup there is a guide on how to use it and what the database models are REQUIREMENT.md

.env Setup

Set this values in .env

POSTGRES_HOST=127.0.0.1
POSTGRES_DB=store_front_dev
POSTGRES_TEST_DB=store_front_test
POSTGRES_USER=store_front_user
POSTGRES_PASSWORD=secret
ENV=dev
TOKEN_SECRET=mySecretKey
SALT=mySaltKey

Ports

The server runs on localhost port 3000 and the database runs on localhost port 5432

Database setup

$ CREATE DATABASE store_front_dev;
$ CREATE DATABASE store_front_test;
$ CREATE USER store_front_user WITH PASSWORD 'secret';
$ \c store_front_dev
$ GRANT ALL PRIVILEGES ON DATABASE store_front_dev TO store_front_user
$ \c store_front_test
$ GRANT ALL PRIVILEGES ON DATABASE store_front_test TO store_front_user

Setup

To run this project,

$ npm install -g db-migrate
$ npm install
$ db-migrate up -e dev
$ npm run watch

image

Running Tests

$ ENV=test npm run test

image

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published