express-router-reload
Easy to use, hot swapper for your express routes.
Examples
const express = ; // normal express what notsvar app = ;var router = ; const RR = ;let reloader = app; app; // After whatever else. Let's say you change the file delete requirecacherequire;router = ; //nowreloader; // Overwrites the old router with the new refreshed one!
An easier way:
const RR = ;let reloader = app; //express stuff... reloader;//The second paramater MUST be the full path.//This basically just does the delete require.cache[require.resolve(path)] for you!