Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express how to refresh

var express = require('express')
var reload = require('express-reload')
var app = express()
 
// path to reload
// important should end with "/" if index.js
var path = __dirname + '/project/'
// or like this for a non index.js name
var path = __dirname + '/project/server.js'
 
app.use(reload(path))
 
app.listen(9000, () => console.log('Listening on 9000'))
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #express #refresh
ADD COMMENT
Topic
Name
8+2 =