im using nodejs and im trying to serve only html files (no jade, ejs ... engines).
heres my entry point (index.js) code:
var express = require(\'express
First of all you need to install ejs engine. For that you can use the following code
npm install ejs
After that you need to add app engine and set the view directory.
The changed code is given below,
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));
app.set('views', __dirname + '/public');
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
app.listen(app.get('port'), function() {
});