Skip to content

daslicht/pm2-dev-refresh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(experimental)

PM2-DEV-Refresh

is a extension for PM2 , The modern and stable CLI process manager for Node apps with native clusterization, monitoring, startup scripts and much more. It will automatically refresh the browser after you save a file.

Setup Client

Add the following code to your clientside template:

 var socket = io.connect( 'http://localhost:3333');
     socket.on( 'refresh', function(){
        console.log('REFRESH!');
        window.location.reload();
     });  

Usage

pm2 dev app.js

Installation / Setup

Currently it is only working with my fork of PM2: https://github.com/daslicht/pm2

Alternatively you could just modify your existing PM2 installation as the following: https://github.com/daslicht/pm2/commit/c59411771334e53ac334abfc9ca3dc5fdfd9c856

The global installed PM2 resides in the following folder on OSX: /usr/local/lib/node_modules/pm2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published