https://todo.moneys-club.pp.ua
- Postgres
- NodeJS (19.7 is currently used). Check how to install
-
Create
.env
from the sample and fill the blankscp .env.sample .env
-
Unless you have Postgres database running - start it using docker-compose
docker-compose up -d
-
Install dependencies
npm install
-
Run database migrations
npm run db:migrate
Output:
> todo-list-backend@1.0.0 db:migrate > NODE_ENV=development sequelize db:migrate Sequelize CLI [Node: 19.7.0, CLI: 6.6.0, ORM: 6.31.0] Loaded configuration file "config/config.js". Using environment "development". == 20230412091240-create-users-table: migrating ======= == 20230412091240-create-users-table: migrated (0.032s) == 20230412091247-create-todos-table: migrating ======= == 20230412091247-create-todos-table: migrated (0.030s)
-
Run the application
npm start
Output:
> todo-list-backend@1.0.0 start > ts-node --require dotenv/config src/index.ts Server started on port 4000 🚀 Executing (default): SELECT 1+1 AS result Connection has been established successfully.
To run tests run the next command
npm test
- Fix tests to make them run on the test database
- Environment variables in tests
- Add support of GraphQL
- Make it running at https://todo.moneys-club.pp.ua