Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hot-update

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hot-update

nodejs hot update

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hot-update

English instructions

Information

This module refers to hot-require and enhanced fault tolerance.

Thank you to the author of hot-require.

Hot update js code without restart server for NodeJs,

Installation

npm install --save hot-update

Getting started

const hotUpdate = require('hot-update');

setInterval(()=>{
  let Mod1 = hotUpdate('./modules/mod1');
  let Mod2 = hotUpdate('./modules/mod2');
  let Obj1 = hotUpdate('./modules/obj1');
  console.log(m1.data, m2.data, Obj1.data);
}, 3000);

中文说明

简介

本模块主要用于js文件的热更新,不需要重启node.js服务。

本模块参考模块 hot-require ,并且添加容错处理,对象字面量处理。

在此,对模块 hot-require 的作者表示感谢。

安装

npm install --save hot-update

快速开始

const hotUpdate = require('hot-update');

setInterval(()=>{
  let Mod1 = hotUpdate('./modules/mod1');
  let Mod2 = hotUpdate('./modules/mod2');
  let Obj1 = hotUpdate('./modules/obj1');
  console.log(m1.data, m2.data, Obj1.data);
}, 3000);

Keywords

FAQs

Package last updated on 03 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc