linnia-models
v1.0.7
Published
A library that contains linnia's model definitions for sequelize
Downloads
11
Readme
Linnia Models
A library that contains all of the sequelize model definitions. Can be used to quickly hook up a microservice to Linnia persistence.
Installation
npm i -S linnia-models
Usage
Getting started with the module is easy:
import { connectToDatabase } from 'linnia-models';
const { Permission, Record, User } = await connectToDatabase();
Record.findAll(.....)
.env setup
To configure the database, you must create a .env
file in the root of the application that uses this module and set your environment variables. Here's an example of a sample file:
LINNIA_DB_NAME=linnia_db
LINNIA_DB_USERNAME=linnia_user
LINNIA_DB_PASSWORD=securepassword