Giter Club home page Giter Club logo

restify-nedb's People

Contributors

dhigginbotham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

restify-nedb's Issues

add exclusions

slightly trivial if the main use will be for caching on authenticated requests, however that's only one use case -- I'd like to add something like:

new nedb {
  # ... other nedb extended settings
  exclude: ['stale','someOther']
}, app

Disable version option

Just saw the code about disabling version option, it should be able to turn version option off by setting version = false

However, the code seems not functioning in:
https://github.com/dhigginbotham/restify-nedb/blob/master/lib/mount.js#L22

The condition will always be fulfilled, and this.version in the resulting uri regardless of its value:

uri = util.format((this.version != null) || this.version !== false ? this.prefix + this.version : this.prefix);

Should it be something like this?

uri = util.format((this.version != null) && this.version !== false ? this.prefix + this.version : this.prefix);

404 no matter what when using restify-nedb

The source of my test app is here: https://gist.github.com/dukedougal/9edb1e4fd525271c57c0

Here is the output of trying to use the restify-nedb API:

ubuntu@ugbuildserver:$ curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:1337/kernel
Cannot POST /kernel
ubuntu@ugbuildserver:
$ curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:1337
Cannot POST /
ubuntu@ugbuildserver:$ curl -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:1337/kernel
Cannot POST /kernel
ubuntu@ugbuildserver:
$ curl -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:1337/kernel
Cannot POST /kernel
ubuntu@ugbuildserver:$ curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:1337
Cannot POST /
ubuntu@ugbuildserver:
$ curl --verbose http://localhost:1337

  • Rebuilt URL to: http://localhost:1337/
  • Hostname was NOT found in DNS cache
  • Trying ::1...
  • Connected to localhost (::1) port 1337 (#0)

    GET / HTTP/1.1
    User-Agent: curl/7.38.0
    Host: localhost:1337
    Accept: /

    < HTTP/1.1 404 Not Found
    < X-Powered-By: Express
    < X-Content-Type-Options: nosniff
    < Content-Type: text/html; charset=utf-8
    < Content-Length: 13
    < Vary: Accept-Encoding
    < Date: Sun, 08 Nov 2015 02:38:35 GMT
    < Connection: keep-alive
    <
    Cannot GET /
  • Connection #0 to host localhost left intact
    ubuntu@ugbuildserver:~$

Errors trying to install and run example using Windows

C:\nodejs\node_modules\restify>npm install restify-nedb --save

npm WARN unmet dependency C:\nodejs\node_modules\npm\node_modules\npm-registry-c
lient\node_modules\couch-login requires request@'~2.9.202' but will load
npm WARN unmet dependency C:\nodejs\node_modules\npm\node_modules\request,
npm WARN unmet dependency which is version 2.42.0
[email protected] ..\restify-nedb
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], underscore
@1.4.4)

Trying to run node example.js

C:\nodejs\node_modules\restify>node example.js
C:\nodejs\node_modules\restify\example.js:29
cfg.makeDataStore();
^
TypeError: Object [object Object] has no method 'makeDataStore'
at Object. (C:\nodejs\node_modules\restify\example.js:29:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

Remove usages of deprecated `req.param()`

I am getting the following errors:

express deprecated req.param(name): Use req.params, req.body, or req.query instead node_modules/restify-nedb/lib/crudify.js:14:14
express deprecated req.param(name): Use req.params, req.body, or req.query instead node_modules/restify-nedb/lib/crudify.js:18:17
express deprecated req.param(name): Use req.params, req.body, or req.query instead node_modules/restify-nedb/lib/crudify.js:19:16
express deprecated req.param(name): Use req.params, req.body, or req.query instead node_modules/restify-nedb/lib/crudify.js:20:16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.