Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
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
The npm package local-alias receives a total of 1 weekly downloads. As such, local-alias popularity was classified as not popular.
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.