Created
July 18, 2021 14:55
-
-
Save seoh/cea4fd5964d08579476dfb5212a042e5 to your computer and use it in GitHub Desktop.
simple server with watching but without tool
This file contains 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
const { createServer: server } = require('http') | |
server((req, res) => { | |
delete require.cache[require.resolve('./run.js')] | |
require('./run.js')(req, res) | |
}).listen(8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment