Created
May 21, 2020 00:43
-
-
Save stestagg/e59648380dd821f36bc766d341ce7642 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
var http = require('http') | |
var path = require('path') | |
var reload = require('reload'); | |
var app = express() | |
app.get('/', function (req, res) { | |
res.sendFile(path.join(__dirname, 'public', 'test.html')); | |
}) | |
var server = http.createServer(app) | |
reload(app).then(function (reloadReturned) { | |
server.listen(3000, function () {}); | |
setInterval(reloadReturned.reload, 5000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment