javascript - NodeJS "Error code: ERR_EMPTY_RESPONSE" -
Unable to load webpage because the server has not sent any data. Error code: ERR_EMPTY_RESPONSE
My local nodjs setup is inadvertently unresponsive when I refresh my computer then it works fine but it keeps giving me the following message in my code Some things are wrong
// dependencies var path = requirement ('path'); Var Express = Required ('Express'); Var http = Required ('http'); Var Mongos = Expected ('mongos'); Var passport = requirement ('passport'); Var localtrazage = requires ('passport-local'). Strategy; Var schemas = required ('./ schema / schema'); // main configuration var app = express (); App.set ('port', process.env.port || 3000); App.set ('views', __dirname + '/ views'); App.set ('visual engine', 'z'); App.set ('View Option', {Layout: Incorrect}); App.use (express.logger ()); App.use (express.bodyParser ()); App.use (express.methodOverride ()); App.use (express.cookieParser ('BodySnatchingLizardPPL')); App.use (express.session ()); App.use (passport.initialize ()); App.use (passport.session ()); App.use (app.router); App Use (express.static (path.join (__derename, 'public')); App.configure ('development', function () {app.use (express.errorHandler) ({dump exception: true, show stack: true});}); App.configure ('output', function () {app.use (express.errorHandler ());}); // Passport Configure Account = Required ('./model / account'); Passport.use (New LocalTrategy (Account (Certify ())); Passport.serializeUser (Account.serializeUser ()); Passport.deserializeUser (Account.deserializeUser ()); // Mongoose Mongoose.connect ('Mongodb: // Demo 2: Demo 2 @ ds0336 99.mongolab.com: 3369 9 / Nicksbudd'); Required ("FS") ReaddirSync ("./ Routes_data_get /") For each (function (file) {requires (". / Routes_data_get /" + file) (app);}); Required ("FS") ReaddirSync (". / Routes_data_post /") For each (function (file) {requires (". / Routes_data_post /" + file) (app);}); Required ("FS") ReaddirSync (". / Routes_data_post /") For each (function (file) {requires (". / Routes_data_post /" + file) (app);}); App.listen (app.get ('port'), function () {console.log (("listen to express server on port" + app .get ('port')))});
Comments
Post a Comment