Skip to content

Match-Reservation-System/Backend

Repository files navigation

LC-Project-Backend

this is the backend of the LC project

🏁Getting Started

  1. Clone the repository
git clone https://github.com/Match-Reservation-System/Backend.git
  1. Go to the directory of the repository
cd Backend
  1. install dependencies
npm install
  1. add .env file

add .env file similar to this

ENV = 'dev'
#ENV = 'test'
LC_POSTGRES_USER= ahmed
LC_POSTGRES_PASSWORD=ahmed
LC_DB_HOST=localhost
LC_DEV_DB="LC_dev"
LC_TEST_DB="LC_test"
LC_DEV_PORT=5001
LC_TEST_PORT=5002

LC_PORT = 5000

PEPPER=your-secret-password
SALT=10

JWT_PRIVATE_KEY=password
  1. create the database

    you need to have docker installed.

 npm run docker:startDev
  1. run the migrations
npm run migrate:run
  1. run the app
npm run start:dev

🏁Testing

  1. chane the env to test
ENV = 'test'
  1. create the database
 npm run docker:startTest
  1. run the migrations
npm run migrate:reset --env test
npm run migrate:run --env test
  1. build the app
npm run build
  1. run the tests
npm run jasmine

🏁Scripts

  • npm i install all the packages
  • npm start to run the app after build
  • npm run build to compile the ts files
  • npm run jasmine run the tests
  • npm run start:dev run app using nodemon
  • npm run migrate:run up all migrations
  • npm run migrate:reset reset all migrations
  • npm run docker:startDev start the dev db
  • npm run docker:startTest start the test db
  • npm run lint run eslint
  • npm run format run prettier
  • npm run fix fix eslint issues

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages