This project was made for a codetest to Monest
- Create a docker with postgres
docker run --name "CONTAINER_IMAGE_NAME" -e POSTGRES_PASSWORD="POSTGRES_PASSWORD" -p "CHOOSE A PORT":5432 -d postgres
- Enter on backend directory and change ormconfig.json
"type": "postgres",
"host": "localhost",
"port": "YOUR_PORT",
"username": "postgres",
"password": "YOUR_POSSWORD",
"database": "postgres",
"entities": [
"./src/models/*.ts"
],
"migrations": [
"./src/database/migrations/*.ts"
],
"cli": {
"migrationsDir": "./src/database/migrations"
}
2.1) Install modules
yarn
2.2) Run migrations
yarn typeorm migration:run
2.3) Start the server (you can change the port in src/server.ts)
yarn dev:server
- Enter on frontend directory and install modules
yarn
3.1) Start the frontend server
yarn start