![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
A simple port-sharing proxy for development on multiple local domains, supports websockets
A simple port-sharing proxy for development on multiple local domains, supports websockets, SSL, and queuing requests whilst development server restarts.
Host
HTTP headertestserve run --exponential-backoff
will automatically re-attempt requests
when your development server restarts (e.g. due to file changes) saving
you from receiving the error page in the intervening seconds (ALPHA)This package is NOT ready for production usage, it's only intended for use on your own development machine!
testserve itself should run on Linux and OS X, but to have .test domains resolve to localhost and to have it run on port 80 you need to do a little additional configuration.
We've currently only instructed you how to do this on OS X and Ubuntu; pull requests are welcome.
npm install -g testserve
testserve install
Follow the instructions to set up port forwarding and DNS resolution.
To run the server:
testserve run
We don't currently daemonize the server, pull requests to add this
functionality would be welcome. In the mean time we recommend you set up
pm2
and then tell it to
run testserve with:
pm2 run /path/to/testserve -- run --exponential-backoff && pm2 dump
To set up a subdomain, simply run
testserve add mysite 1337
This'll tell testserve to proxy all HTTP requests for mysite.test
and mysite.*.*.*.*.xip.io
to localhost:1337
Alternatively, to serve static files:
testserve add staticsite /path/to/public
This'll tell testserve to serve static content from /path/to/public/
to anyone
requesting http://staticsite.dev/
If you want a local domain to be served with SSL you must generate a certificate for it:
testserve ssl staticsite
Then follow the instructions.
This is an issue with discoveryd (it also affects Pow - see https://github.com/basecamp/pow/issues/471) - should be fixed by updating to OS X 10.10.4
Pull requests welcome!
testserve
└── extras
├── macos-launchd
├── supervisord
├── systemd
└── systemv
node
formula dependency) Homebrew CONTRIBUTINGFAQs
A simple port-sharing proxy for development on multiple local domains, supports websockets
We found that testserve demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.