TypeORM integration for Nuxt 📖 Release Notes
Provides simple, drop-in support for TypeORM in nuxt projects.
- Add
nuxt-typeormdependency to your project
yarn add eyeruleall/nuxt-typeorm # or npm install eyeruleall/nuxt-typeorm-
Pass in your connection options inside the
nuxt.configfile.See TypeORM Docs for details.
// example options
{
type: 'sqlite',
database: './database/db.sqlite',
entities: ['./**/*.entity.{ts, js}'],
logging: false,
synchronize: true
}-
Add
nuxt-typeormto themodulessection ofnuxt.config.jsTHIS STEP IS REQUIRED. THIS PACKAGE WILL NOT READ CONFIGURATION FROM FILES
{
modules: [
[
"nuxt-typeorm",
{
/* connection options go here */
}
]
];
}or
{
modules: ["nuxt-typeorm"],
typeorm: {
/* or here */
}
}- Of course, only try to connect to TypeORM from server.
Copyright (c) eyeruleall eyeruleall@gmail.com