Skip to content

Migrate database access to NestJS #1006

@lamkeewei

Description

@lamkeewei

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions