I have this node.js project, it uses jade template. But I need to use simple html pages. Guideline needed for safe transformation.
I need to use complete .html pages like index.html, login.html. Without any template engine to show at routes like localhost:3000 and localhost:3000/login.html. Which should work with full functionality.
You can change it in config/express.js:
app.set('view engine', 'jade')
For example, if you want to use Handlebars, then remove "jade": "latest", in packages.json and add "handlebars": "latest". Then run npm install and edit config/express.js:
app.set('view engine', 'handlebars')
Express server static html files by default.
Place your html files in /public folder:
...
/public
index.html
login.html
...
and go localhost:3000/ or localhost:3000/login.html but this is static files and then the application logic should be on the front-end. For example using angular or backbone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With