Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
local-alias
Advanced tools
Readme
Simple Node.js server app that allows you to create short aliases for any URL provided.
npm install -g local-alias
You can install it on any machine running Node.js. I'm serving it from RaspberryPI 3.
Note that this tool makes sense if your hostname is short (e.g. home
/ http://home/
) and the server runs at default 80
port.
Therefore please make sure that 80
port is available on your machine.
You can always change the port
value in the config.json
file.
Here's how to change your hostname on RPi.
cd $(npm root -g)/local-alias
nano config.json
Configure your config.json
file providing an alias name as a key and URL as the value.
{
"port": 80,
"aliases": {
"oh": "http://openhabianpi:8080/start/index",
"github": "https://github.com/issues/mentioned"
}
}
This way you have a quick access to those URLs by simply typing
home/github
in your browser.
You can also link aliases to other aliases (with >
prefix) if you don't want to duplicate URLs.
{
"port": 80,
"aliases": {
"forum": "https://community.openhab.org",
"community": ">forum"
}
}
You can also create simple URL wildcards with %s
in the URL value:
{
"aliases": {
"binding": "http://docs.openhab.org/addons/bindings/%s/readme.html",
"help": "http://docs.openhab.org/search?q=%s"
}
}
And use it like this:
http://home/binding/airquality
http://home/help/whatever
node local-alias
There's a possibility to run this as a service using forever
.
But before you do that, you'll need to make sure that you set right permissions to run server on 80
port.
On Debian/Ubuntu:
sudo apt-get install libcap2-bin
sudo setcap cap_net_bind_service=+ep `readlink -f \`which node\``
And then install and run forever
npm i -g forever
sudo forever start $(npm root -g)/local-alias
FAQs
Simple Node.js server for setting up local aliases for various URLs
We found that local-alias 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).