Socket
Socket
Sign inDemoInstall

cher-db

Package Overview
Dependencies
150
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cher-db

Data layer for Cher


Version published
Weekly downloads
16
increased by700%
Maintainers
1
Install size
15.5 MB
Created
Weekly downloads
 

Readme

Source

cher-db

The dafault database module for cher

Usage

const cherDb = require('cher-db');

cherDb(myDbUrl)
  .then((db) => {
    const models = db.models() // cher model manager
    const SocialContent = models.get('SocialContent')
    db.destroy() // destroys the db connection
  })

Tests

Create your test db and user

$ createdb foo_test
$ createuser foo_test

Create test/test.env with your DATABASE_URL configured

$ echo "DATABASE_URL=postgres://user:password@hostname:port/database" >> test/test.env

Run Tests

$ npm test

Profit.

FAQs

Last updated on 17 May 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc