Reputation: 105
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...")
})
Upvotes: 3
Views: 1666