mirror of
https://github.com/UniversityOfHelsinkiCS/ohtuilmo.git
synced 2026-10-12 19:03:41 +03:00
2b84bb4f8b2425c92d39704cf4ffe8f643aa8cb8
Installation
Clone and run:
npm install
Instructions
Create .env file to the project root and add following lines:
DATABASE_URI=TODO
PORT=3001
TEST_PORT=3002
TEST_DATABASE_URI=//
Run npm run watch to run the project in watch mode
Test get request: http://localhost:3001/api/examples/. Should return { "test": "ok" }
Docker instructions
Database instructions
-
sudo might need to be used with docker commands
-
"docker ps" lists all running containers
- Copy docker-compose.yml from shared Google drive folder
- Run "docker-compose up" inside the same folder where your docker-compose.yml file is. Now frontend, backend and database containers should be running
- Open new terminal or use detached mode (docker-compose -d up)
- "docker exec -it containername /bin/bash" lets you run commands inside a container
- Run "psql -U postgres" inside container and now you should be able to do sql queries
Languages
JavaScript
97.9%
CSS
1.9%
Dockerfile
0.2%