rook2pawn / node-ddos

Stop denial of service attacks, configurable allowable burst rate.
MIT License
235 stars 37 forks source link

ENOENT: no such file or directory, open '/types/mime.types' #26

Open AnthonyNahas opened 6 years ago

AnthonyNahas commented 6 years ago

I've just added the dos module to my nodes server and since that integration the server is not starting anymore...

This error message is being displayed on the screen and I have no idea what's going wrong with mime.types directory...

> node dist/server.js

fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/types/mime.types'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Mime.load

Usage: as expected:

var Ddos = require('ddos')
var express = require('express')

const ddos = new Ddos();
app.use(ddos.express);

any idea? any suggestion ?

These are some information about my env: OS: Mac OS highSierra Node: v8.9.4 Npm: 5.5.6 dos: current (0.1.28)

rook2pawn commented 6 years ago

Taking a look at this @AnthonyNahas