Giter Club home page Giter Club logo

express-brute-mongoose's People

Contributors

cbargren avatar eliotfallon213 avatar implausible avatar jfromaniello avatar ngpixel avatar ntotten avatar pose avatar samio avatar splitter avatar

Stargazers

 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

express-brute-mongoose's Issues

_id in the schema causing trouble?

I get this error:

Unhandled rejection MongoError: The field 'background' is not valid for an _id index specification. Specification: { v: 2, ns: "app.bruteforce", key: { _id: 1 }, name: "_id_1", background: true, unique: false }

but it goes away if I delete the _id field in the schema?

error with mongoose 4.9.8.

express-brute-mongoose is not working since express 4.9.8+.

TypeError: Cannot read property 'saveSubdocs' of undefined

Usage Question

Hello,

I'm new to nodejs and attempting to learn so I could easily be doing things wrong but how exactly do we check that this works? So far I've copied and pasted your sample code into my index.js changing the route to my "login" instead of "auth" and attempted making multiple api calls but I never get a 403 code kicked back. I also used robo mongo to check the DB for bruteforce collection entires but it's blank. Am I missing something?

How to add custom data in schema

Hi!

I have created a custom schema with additional properties, e.g. "userId" on the data field (along side count, lastRequest and firstRequest). However, these properties are not saved in mongo. I cannot figure out how to make this happen. Any input?

Did you try nesting Schemas? You can only nest using refs or arrays.

When I follow the readme, I get this error using the default schema:

/Applications/XAMPP/xamppfiles/htdocs/everest/node_modules/mongoose/lib/schema.js:362
    throw new TypeError('Undefined type at `' + path +
    ^

TypeError: Undefined type at `paths._id`
  Did you try nesting Schemas? You can only nest using refs or arrays.
    at Function.Schema.interpretAsType (/Applications/XAMPP/xamppfiles/htdocs/everest/node_modules/mongoose/lib/schema.js:362:11)
    at Schema.path (/Applications/XAMPP/xamppfiles/htdocs/everest/node_modules/mongoose/lib/schema.js:305:29)
    at Schema.add (/Applications/XAMPP/xamppfiles/htdocs/everest/node_modules/mongoose/lib/schema.js:217:12)
    at Schema.add (/Applications/XAMPP/xamppfiles/htdocs/everest/node_modules/mongoose/lib/schema.js:212:14)
    at new Schema (/Applications/XAMPP/xamppfiles/htdocs/everest/node_modules/mongoose/lib/schema.js:73:10)
    at Mongoose.model (/Applications/XAMPP/xamppfiles/htdocs/everest/node_modules/mongoose/lib/index.js:294:14)
    at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/everest/server/auth/local/index.js:15:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/everest/server/auth/index.js:13:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Unhandled promise

Hi mate,

This doesn't work for node version 8.5.0. Could you please have a look into it?
It says that their is an unhandled promise.

Thanks.

createWrapperSync is not a function

I'm just trying to do an example app like in the readme. Trace below.

    createWrapperSync('init', objToDecorate.$__init, null, kareemOptions);
    ^

TypeError: schema.s.hooks.createWrapperSync is not a function
    at applyHooks (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/mongoose/lib/services/model/applyHooks.js:50:5)
    at Function.compile (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/mongoose/lib/model.js:3782:3)
    at Mongoose.model (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/mongoose/lib/index.js:381:22)
    at Object.<anonymous> (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/src/server.js:9:20)
    at Module._compile (module.js:660:30)
    at loader (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at Object.<anonymous> (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/babel-cli/lib/_babel-node.js:154:22)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] babel-node: `babel-node --presets=env "src/server.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] babel-node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/joshclark/.npm/_logs/2018-01-23T16_01_30_773Z-debug.log
[nodemon] app crashed - waiting for file changes before starting...
/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/mongoose/lib/services/model/applyHooks.js:50
    createWrapperSync('init', objToDecorate.$__init, null, kareemOptions);
    ^

TypeError: schema.s.hooks.createWrapperSync is not a function
    at applyHooks (/Users/joshclark/dev/sandbox/security/rate-limit/express-brute/mongoose/node_modules/mongoose/lib/services/model/applyHooks.js:50:5)```

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.