How to use live reload in an express server


So i’m using express to make a server:

const express = require('express');
const app = express();

const PORT = 3000;

app.get('/', (req, res) => {

app.listen(PORT, () => {
    console.log(`Server running on http://localhost:${PORT}`)

The server works successfully, however i need it to live-reload when I update the HTML file

Can anyone help?


npm install -g nodemon

next add a script line to your package.json

"live": "nodemon server.js" 

now when you npm live it’ll live reload

for more details see

if live page reload is also needed

npm install -g livereload
livereload . -w 1000 -d

for more details see

Answered By – MarcoWriteCode

Answer Checked By – Cary Denson (AngularFixing Admin)

Leave a Reply

Your email address will not be published.