Skip to content

Instantly share code, notes, and snippets.

@newcanopies
Forked from gaearon/node_hot_reload.js
Created April 10, 2021 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save newcanopies/1127c452eb66214d8ede574590749081 to your computer and use it in GitHub Desktop.
Save newcanopies/1127c452eb66214d8ede574590749081 to your computer and use it in GitHub Desktop.
const express = require('express');
const app = express();
// Application
app.get('/', function(req, res) {
if (process.env.NODE_ENV === 'development') {
for (var key in require.cache) {
delete require.cache[key];
}
}
require('./handler')(req, res);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment