šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

coal

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coal

Mysql ORM base on knexjs

0.3.0
latest
Source
npm
Version published
Weekly downloads
12
-65.71%
Maintainers
1
Weekly downloads
Ā 
Created
Source

coal

Base on knexjs

Install

npm install coal --save

Getting start

database configure

config.js

exports.database = {
  client: "mysql",
  connection:{
    host : 'localhost',
    user : 'root',
    password : '12345678',
    database : 'page-monitor'
  },
  debug: false
}

schema:

exports.schema = {
  id: "increments primary",
  name: "string",
  url:"string",
}

init tables

Coal = require('coal')
config = require('./config')
await Coal.init(_config.database)
await Coal.createTable([schema])

Get knexjs instance

Coal.get()

Keywords

coal

FAQs

Package last updated on 23 May 2019

Did you know?

Socket

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