hotload

Hot load (hot require) for NodeJS. It's like JRebel but for NodeJS.

Usage no npm install needed!

<script type="module">
  import hotload from 'https://cdn.skypack.dev/hotload';
</script>

README

Hot code reload for NodeJS

TL;DR:

```javascript

// lib.js
module.exports = {
    "key": "value"
}

// index.js
hotload = require("hotload");

//lib = require("lib");
lib = hotload("./lib.js");

setInterval(function()
{
    // normally it would print 'value' indefinitely,
    // but at runtime try to change value of "key" in lib.js
    // and save lib.js file and see that module will be reloaded
    // and new value will be printed.
    console.log(lib.key);

}, 1000);


```

Install

npm install hotload

Introduction

Reload library without application shut down. Not suitable for production use.

hotload = require("hotload");