Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate database access to NestJS #1006

Open
lamkeewei opened this issue Sep 2, 2021 · 0 comments
Open

Migrate database access to NestJS #1006

lamkeewei opened this issue Sep 2, 2021 · 0 comments

Comments

@lamkeewei
Copy link
Contributor

The first step of the migration involves moving Sequelize into Nest. Existing model definitions can be reused as we already make use of sequelize-typescript. We will make use of Nest in standalone application mode to initialise and pass models to services and controllers. Tests should continue to pass.

Models to be migrated:

  • Checker
  • PublishedChecker
  • Template
  • User
  • UserToChecker

Example of how bootstrap would be modified after this step:

const app = await NestFactory.createApplicationContext(AppModule)
...
const sequelize = app.get(Sequelize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant