diff --git a/pages/en/lb4/readmes/loopback-next/extensions/typeorm/README.md b/pages/en/lb4/readmes/loopback-next/extensions/typeorm/README.md index 6dfa6a2c5..eb63670b5 100644 --- a/pages/en/lb4/readmes/loopback-next/extensions/typeorm/README.md +++ b/pages/en/lb4/readmes/loopback-next/extensions/typeorm/README.md @@ -58,7 +58,6 @@ export const SqliteConnection: ConnectionOptions = { synchronize: true, }; ``` - Make sure to install the underlying database driver. For example, if you are using SQlite, you'll need to install `sqlite3`. @@ -66,6 +65,20 @@ using SQlite, you'll need to install `sqlite3`. npm install sqlite3 ``` + +Then, register `SqliteConnection` connection in `application.ts` file as shown below: + +```ts +import {BootMixin} from '@loopback/boot'; +import {RestApplication} from '@loopback/rest'; +import {TypeOrmMixin} from '@loopback/typeorm'; +export class MyApplication extends BootMixin(TypeOrmMixin(RestApplication)) { + super(options); + this.connection(SqliteConnection); + ... +} +``` + Refer to the [TypeORM documentation](https://github.com/typeorm/typeorm#installation) for the supported databases and the underlying drivers.