ubuntu-nodesrv

Simple system service management and http reverse proxy.

Usage no npm install needed!

<script type="module">
  import ubuntuNodesrv from 'https://cdn.skypack.dev/ubuntu-nodesrv';
</script>

README

nodesrv for Ubuntu

Simple system service management and http reverse proxy.

Installation

npm install ubuntu-nodesrv -g && sudo nodesrv --install

Create services

nodesrv example.com create creates a service for /var/www/example.com/app.js

Control services

  • nodesrv example.com start to start a service,
  • nodesrv example.com stop to stop a service and
  • nodesrv example.com status to see if a service is running.

HTTP reverse proxy

Start or stop the service using service nodesrv start and stop.

Edit /etc/nodesrv.conf to add, change or remove hostnames or port mappings:

{
  "basedir": "/var/www/",
  "hosts": {
    "example.com": 8001,
    "www.example.com": 8001,
    "example2.com": 8002
  }
}

The proxy is able to handle WebSocket upgrade requests properly.

License

MIT