this is the backend of the LC project
- Clone the repository
git clone https://github.com/Match-Reservation-System/Backend.git
- Go to the directory of the repository
cd Backend
- install dependencies
npm install
- 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
-
create the database
you need to have docker installed.
npm run docker:startDev
- run the migrations
npm run migrate:run
- run the app
npm run start:dev
- chane the env to test
ENV = 'test'
- create the database
npm run docker:startTest
- run the migrations
npm run migrate:reset --env test
npm run migrate:run --env test
- build the app
npm run build
- run the tests
npm run jasmine
npm i
install all the packagesnpm start
to run the app after buildnpm run build
to compile the ts filesnpm run jasmine
run the testsnpm run start:dev
run app using nodemonnpm run migrate:run
up all migrationsnpm run migrate:reset
reset all migrationsnpm run docker:startDev
start the dev dbnpm run docker:startTest
start the test dbnpm run lint
run eslintnpm run format
run prettiernpm run fix
fix eslint issues