Skip to content

sunmait/sunmait-career-day-backend

Repository files navigation

Sunmait career day API server

TODO

  • cover users controller with tests
  • remove import = require
  • make sure timestamps for sequelize working fine
  • setup docker for dev needs (db)
  • setup docker for migration/seeders

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published