kenote-mount

1.0.1 • Public • Published

kenote-mount

mount the directory into an alias

NPM Version NPM Downloads Build Status Codecov Status dependencies Status Gratipay

Install

npm install --save kenote-mount

Usage

// mounts
 
const path = require('path')
const { mounts } = require('kenote-mount')
const { userProxy, bookProxy } = mounts(path.resolve(__dirname, 'proxys'), 'Proxy')
 
userProxy.login(...)
bookProxy.find(...)
 
// loadModel
 
const mongoose = require('mongoose')
const MongooseDao = require('mongoosedao')
const { loadModel } = require('kenote-mount')
const Schema = mongoose.Schema
 
function getMongooseDao (definition, name) {
  let schema = new Schema(definition)
  let model = mongoose.model(name, schema)
  return new MongooseDao(model)
}
 
module.exports = loadModel(__dirname, getMongooseDao)

License

this repo is released under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i kenote-mount

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • thondery