fl-initdb

11.4.5 • Public • Published

fl-initdb

Auto create and populate a database from a connection string and backbone models

Usage

import User from '../models/User'
import initdb from 'fl-initdb'

initdb({
  User,
  databaseUrl: process.env.DATABASE_URL,
  modelsDir: path.resolve(__dirname, '../models'),
  scaffold: require(`../../scaffold/${process.env.NODE_ENV}`),
}, err => {if (err) console.log('Error initialising database:', err)})

Readme

Keywords

none

Package Sidebar

Install

npm i fl-initdb

Weekly Downloads

6

Version

11.4.5

License

MIT

Unpacked Size

12.2 kB

Total Files

10

Last publish

Collaborators

  • founderlab