Skip to content

thondery/kenote-mount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

mount the directory into an alias

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published