0.1.0 • Published 10 years ago
pliers-update-database v0.1.0
pliers-update-database
Pliers task to wrap common usage of the database-updates module
You must have a version of mongodb installed in the dependency tree that has a MongoClient class
available at require('mongodb').MongoClient.
Installation
npm install --save pliers-update-databaseUsage
module.exports = task
var updateDatabase = require('pliers-update-database')
function task(pliers) {
var databaseUrl = 'mongodb://localhost:27017/test'
, updatePath = './database-updates'
pliers('updateDatabase', updateDatabase(pliers, databaseUrl, updatePath))
}var pliersTask = updateDatabase(pliers, databaseUrl, updatePath)
Options must include:
pliers- a pliers instancedatabaseUrl- a mongodb uri connection string- This can be overridden if needed via
process.env.MONGO_URL
- This can be overridden if needed via
updatePath- the path to your database-updates files
Credits
License
ISC
0.1.0
10 years ago