3

I'm not sure why I am getting this error. Here is my code. Express was already installed with npm install express --save

var express = require('express');
var app = express();
var fs = require('fs')
var path = require('path');

app.get('/register.html',function(req, res){
  res.sendFile(path.join(__dirname+'/register.html'));
});

var server = app.listen(process.env.PORT, function(){
    console.log("Server is listening...")
})
Govind Samrow
  • 9,981
  • 13
  • 53
  • 90
Ahmed Ahmed
  • 105
  • 7

1 Answers1

3

Update express to 4.8+

npm update express --save

wayofthefuture
  • 8,339
  • 7
  • 36
  • 53