mongolor
v1.0.2
Published
Easy cross-platform run MongoDB server relatively your's projects.
Downloads
8
Maintainers
Readme
- Installing
npm install mongolor --save-dev
- Using
- Put in root of your project mongolor.config.js
// Default MongoDB settings
module.exports = {
host: 'localhost',
port: 27017,
logs: 'db/logs', // Relative path from root
data: 'db/data' // Relative path from root
}
- Setting package.json
{
"scripts": {
// ...
"db:start": "mongolor start",
"db:stop": "mongolor stop"
}
}
- Running
# start service/daemon
# Note: Windows users must run from the administrator!
$ npm run db:start
# stop service/daemon
# Note: Windows users must run from the administrator!
# Windows service will be deleted.
$ npm run db:stop