Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 1.35 KB

README.md

File metadata and controls

76 lines (51 loc) · 1.35 KB

Sunmait career day API server

Installation

You need to have PostgreSQL running on your local machine. PostgreSQL server config file located in:

/API/config/default.example

create your own 'default.json' with your data. Also you need to create a database with name "sunmait_career_days_development".

Installation all dependencies:

npm run install-all

Creating tables and filling them with test data (Migrations)

Configuration file located in:

/migrations/config.example

create your own 'config.json' with your data.

Next, to create tables you need run:

npm run migrate

and then for filling tables with test data run:

npm run seed

To undo migrate, run:

npm run migrate:undo

for seed run:

npm run seed:undo

Running server

To start the server run

npm start

Configuration to run in Docker

Development

To start the server in the docker container, you must correctly specify the database configuration in API/config/default.json and migrations/config/config.json.

By default, database config ​​should be equal to:

"username": "root",
"password": "my_password",
"database": "sunmait_career_days_development",
"host": "sunmait-career-day-devdb",
"port": "3306"

These values ​​you can find in the docker/docker-compose.dev.yml file.