npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-express-reload

v0.1.22

Published

Helps to refresh your application after changes. Reload application server (hosting and cloud), kill process and install NPM packages online

Downloads

6

Readme

node-express-reload

Reload application server (hosting and cloud), kill process and install NPM packages online

  • Helps to refresh your application after changes
  • Automaticly reload your express.js server without bringing down the server
  • Reload server
  • Kill process
  • Kill port
  • List pid processes
  • List, fix and audit packages
  • Install new packages (get method)

WARNING: Do not use the development server in a production environment.

Install

NPM

npm install node-express-reload

Example 1 (reloaded manually)

view code example

const express = require("express");
const app = express();
const PORT = 8080;

// ** Secure change ** 
// ** change route /ner to /any-another-word **
app.use('/ner', require("node-express-reload")({
  username: 'admin', // if not defined, your username will be admin
  password: 'NeR777#',
  serverfile: __filename,
}));

// Open options 
// http://localhost:8080/ner/
// http://localhost:8080/any-another-word/
// Reloaded manually
// http://localhost:8080/ner/reload/
// http://localhost:8080/any-another-word/reload

app.get("/", (req, res) => res.send(`I'm pid ${process.pid} and port ${PORT}`));
app.listen(PORT);

Example 2 (without bringing down the server)

view code example

Silent reload module (express router)

const express = require("express");
const app = express();
const requireWatcher = require("node-express-reload")('require-watcher');
const PORT = 8080;

// silent reload
app.use('/home', requireWatcher( __dirname + '/home/index.js')) // or only '/home/'

app.get("/", (req, res) => res.send(`I'm pid ${process.pid} and port ${PORT}`));
app.listen(PORT);

Example 3 (watcher files)

view code example

const express = require("express");
const app = express();
const PORT = 8080;

app.use('/ner', require("node-express-reload")({
  serverfile: __filename,
  watcher: ['.'], // {array}  __filename | . | ./ | index.js | /path-name | . (dot is all depth files)
  depth: 10,
}));

app.get("/", (req, res) => res.send(`I'm pid ${process.pid} and port ${PORT}`));
app.listen(PORT);

Another resource to management

  • Example 1
  • http://localhost:8080/ner
  • http://localhost:8080/any-another-word

Screens

GET Method

GET http://localhost:8080/ner/reload/
GET http://localhost:8080/ner/kill/
GET http://localhost:8080/ner/kill/PID (pid is a number)
GET http://localhost:8080/ner/npm/i/pdfkit-table,cors

Actions

| router | action | example | | -------| -------| --------| | /ner/kill | kill owner process | http://localhost:8080/ner/kill | | /ner/kill/:pid? | kill process | http://localhost:8080/ner/kill/123456 | | /ner/reload/:pid? | kill process and restart | http://localhost:8080/ner/reload | | /ner/list | pid list | http://localhost:8080/ner/list | | /ner/list-all | big pid list | http://localhost:8080/ner/listall | | /ner/pid | show process id (PID) | http://localhost:8080/ner/pid | | /ner/npm/:type/:packages | Install and uninstall packages. type: i or u. | http://localhost:8080/ner/npm/i/pdfkit-table,cors | | /ner/npm/fix | npm fix | http://localhost:8080/ner/npm/fix | | /ner/npm/ls | npm ls | http://localhost:8080/ner/npm/ls | | /ner/npm/audit | npm audit | http://localhost:8080/ner/npm/audit | | /ner/npm/install | npm install package.json | http://localhost:8080/ner/npm/install |

Options

Soon.

License

The MIT License.

Author

Thank you