1.2.8 • Published 7 years ago

dpd-filebased-mongodb v1.2.8

Weekly downloads
3
License
ISC
Repository
-
Last release
7 years ago

run deployd without mongodb (but a jsonfile instead to store data)

Usage

$ npm install dpd-filebased-mongodb mongo-mock --save
$ mkdir data
$ export MONGO_DB_FILE=data/mongo.js
$ node app.js

Now make sure you include it before deployd itself in your app.js:

	require('dpd-filebased-mongodb')           // <-- magic right there
	var deployd = require('deployd')
	var dpd = deployd({port:3000});
	dpd.listen();

That's it! Now your data is stored in data/mongodb.js

Why

  • Sometimes you want to use deployd for simple api's without the mongodb-requirement.
  • Sometimes you want to test deployd with a fake mongodb

Notes

  • to specify a different dbfile, specify environment variable MONGO_DB_FILE="data/foo.js" etc
  • it doesn't run all mongo-queries, see mongo-mock
  • because of this, hide(field) doesn't always work (solution: put if( this.password ) delete this.password into event-code)
1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0-t

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago