
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
An nodejs expressjs router, hopefully simple to run with npm scripts. Uses letsencrypt for https encryption.
an nodejs expressjs router, giving you outward https encryption with certificates issued from letsencrypt.
basically my script i use for https certs on deployment.
npm install -g routerjon
mkdir routerjon
cd routerjon
touch config.json
config json should list the different domains you will use. and to which routerjon should redirect them.
for example the config running on my deployment at blogjono.com is
{
"ports": {
"http": 80,
"https": 443
},
"production": true, // server for letsencrypt, note production has rate limit
"email": "jono-lee@hotmail.co.uk",
"router": { // these are servers already running on the machine
"blogjono.com": {
".": 9000,
"fcc-pin": 9001,
"booktrade": 9003
},
"opentorah.uk": 9002
}
}
The default config fills in any gaps missed by your config.
{
"ports": {
"http": 3000,
"https": 3443
},
"production": false,
"spdy": false, // option to use an experimental http2 server
"domains": {
"localhost:3000": 9000
}
}
[sudo] routerjon ./conifg.json
nohup routerjon ./config.json
make sure you are in a directory with a file named exactly config.json
when routerjon crashes it will foreverjs process manager will restart it
[sudo] npm i -g forever
touch routerjon_forever
routerjon_forever file
#!/bin/sh
routerjon ./config.json
[sudo] forever start -c bash routerjon-forever
you may need sudo or root privallages to run the command with the server ports 80 and 443. you will also need to stop any other servers (like nginx, apache) listening on these ports
by default when you edit the config with valid json and save the file, changes will be automatically reloaded (thanks to node-watch). This makes it easy to vim into and fiddle with the routers port numbers
this module uses greenlock v3 to manage certificates which stores the files in ~/.config/greenlock. sometimes you may have to delete this folder if you run into errors in the logs.
so that the nodejs app does not run as root it is suggested to install and use libcap2
sudo pacman -Syu libcap
sudo setcap cap_net_bind_service=+ep `readlink -f \`which node\``
the script will store your certificates in the ~/letsencrypt directory.
i am not sure the greenlock-express module causes them to autorenew.
author: Jonathan T L Lee
licence: MIT
repo: https://github.com/Lee182/routerjon
feel free look around the code. its only 176 lines
FAQs
An nodejs expressjs router, hopefully simple to run with npm scripts. Uses letsencrypt for https encryption.
We found that routerjon demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.