linnia-models

1.0.7 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i linnia-models

Weekly Downloads

7

Version

1.0.7

License

UNLICENSED

Unpacked Size

6.25 kB

Total Files

9

Last publish

Collaborators

  • max.blaushild