Skip to content

Servidor para TP1 de 75.47 - Taller de Desarrollo de Proyectos 2

Notifications You must be signed in to change notification settings

martinerrazquin/7547_tp1_server

Repository files navigation

7547_tp1_server

Servidor para TP1 de 75.47 - Taller de Desarrollo de Proyectos 2

Build Status codecov Heroku

Run

  • docker-compose up

The API will listen on localhost:3000, and reload on any changes to the source.

Changes to the DB schema

The API uses Sequelize to connect to its PostgreSQL DB, and changes are handled using Sequelize-CLI. When making changes to the DB schema, follow these steps:

  • Create a new migration that contains the changes to be added. (Use docker-compose exec app ./node_modules/.bin/sequelize migration:generate --name [YOUR_MIGRATION_NAME] to make sure it's timestamped)
  • Implement those changes in the Sequelize model.
  • Run migration (docker-compose exec app npm run db:migrate).

Adding seeds

  • Run docker-compose exec app ./node_modules/.bin/sequelize seed:generate --name [YOUR_SEED_NAME] to generate it.
  • Implement the seed.
  • Run seeds (docker-compose exec app npm run db:seed:all)

Before pushing

Make sure that all tests pass and there are no code style errors by running docker-compose exec app npm test before pushing.

About

Servidor para TP1 de 75.47 - Taller de Desarrollo de Proyectos 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published