All Projects → nswbmw → Proxy Hot Reload

nswbmw / Proxy Hot Reload

Node.js application hot reload with `Proxy`.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Proxy Hot Reload

Api
姬长信API For Docker 一个基于多种编程语言开源免费不限制提供生活常用,出行服务,开发工具,金融服务,通讯服务和公益大数据的平台.
Stars: ✭ 743 (+3810.53%)
Mutual labels:  proxy
Pizzly
The simplest, fastest way to integrate your app with an OAuth API 😋
Stars: ✭ 796 (+4089.47%)
Mutual labels:  proxy
Keyless Solution
The solution of keyless proxy.
Stars: ✭ 16 (-15.79%)
Mutual labels:  proxy
Mycat2
MySQL Proxy using Java NIO based on Sharding SQL,Calcite ,simple and fast
Stars: ✭ 750 (+3847.37%)
Mutual labels:  proxy
Clashy
A GUI proxy client for Windows / Mac / Ubuntu Desktop based on Clash and Electron. Windows / Mac / Ubuntu 适用的Clash客户端.
Stars: ✭ 775 (+3978.95%)
Mutual labels:  proxy
Simple Java Mail
Simple API, Complex Emails (JavaMail smtp wrapper)
Stars: ✭ 821 (+4221.05%)
Mutual labels:  proxy
V2ray Web Manager
v2ray-web-manager 是一个v2ray的面板,也是一个集群的解决方案;同时增加了流量控制/账号管理/限速等功能。key: admin , panel ,web,cluster,集群,proxy
Stars: ✭ 738 (+3784.21%)
Mutual labels:  proxy
Osu Hope
osu!HOPE: HoLLy's osu! Packet Editor
Stars: ✭ 18 (-5.26%)
Mutual labels:  proxy
Vue 163 Music
【停止维护】网易云音乐web版,支持PC端常用功能,localStorage保存播放列表
Stars: ✭ 788 (+4047.37%)
Mutual labels:  proxy
Docker Dante Telegram
dante config builder for Telegram SOCKS-proxy & Dockerfile for building image with such proxy
Stars: ✭ 16 (-15.79%)
Mutual labels:  proxy
Muxy
Chaos engineering tool for simulating real-world distributed system failures
Stars: ✭ 756 (+3878.95%)
Mutual labels:  proxy
Corvus
A fast and lightweight Redis Cluster Proxy for Redis 3.0
Stars: ✭ 758 (+3889.47%)
Mutual labels:  proxy
Freess
免费ss账号 免费shadowsocks账号 免费v2ray账号 (长期更新)
Stars: ✭ 6,544 (+34342.11%)
Mutual labels:  proxy
Guard
NOT MAINTAINED! A generic high performance circuit breaker & proxy server written in Go
Stars: ✭ 745 (+3821.05%)
Mutual labels:  proxy
Node Procedural Async
Write procedural style code that runs asynchronously. It may look synchronous, but it's not!
Stars: ✭ 17 (-10.53%)
Mutual labels:  proxy
Rotating Proxy
Rotating TOR proxy with Docker
Stars: ✭ 739 (+3789.47%)
Mutual labels:  proxy
Fod
Freedom of Developers
Stars: ✭ 815 (+4189.47%)
Mutual labels:  proxy
Gotit
Help You Got It (golang dependencies)
Stars: ✭ 19 (+0%)
Mutual labels:  proxy
Procurator
Socks5 server and client, utilizing epoll only.
Stars: ✭ 18 (-5.26%)
Mutual labels:  proxy
Warwolf
Socks5-Over-HTTP (A Socks5 proxy runs on plain old HTTP requests, no websocket. Deployable on Google AppEngine) 🤟 😚 👁 🤦🏻‍♂️ 💃🏻 🕺🏻
Stars: ✭ 16 (-15.79%)
Mutual labels:  proxy

proxy-hot-reload

Node.js application hot reload with Proxy.

NB: proxy-hot-reload can only proxy modules that return an plain object, like:

module.export = { ... }
// or
exports.xxx = ...

Install

$ npm i proxy-hot-reload --save

Example

app.js

'use strict';

if (process.env.NODE_ENV !== 'production') {
  require('proxy-hot-reload')({
    includes: '**/*.js'
  });
}

const express = require('express');
const app = express();
const user = require('./user');

app.get('/', function (req, res) {
  res.send(user);
})

app.listen(3000);

user.js

module.exports = {
  id: 1,
  age: 19
}
DEBUG=proxy-hot-reload node app.js

Then try to modify user.js, access to localhost:3000.

Usage

require('proxy-hot-reload')([option])

option:

  1. includeFiles([obsolute filepath]) || includes(glob pattern string): as PROXY_HOT_RELOAD_INCLUDES, files should be includes, see glob.
  2. excludeFiles([obsolute filepath]) || excludes(glob pattern string): as PROXY_HOT_RELOAD_EXCLUDES, files should be excludes, see glob.
  3. watchedFileChangedButNotReloadCache: default:
function (filename) {
  debug(`${filename} changed, but not reload cache!`)
}

Note

  1. proxy-hot-reload should not be used in production environment.
  2. proxy-hot-reload is effective for some specific files like: lib/*.js, utils/*.js etc.

If you find some bugs please raise an issue or make a pull request.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].