
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
serve-here
Advanced tools
#serve-here
local static server
everything start from here
look up available port automatically, which means multiple instances without specifying port
custom routes by scripting here.js
live reload
support https
add ip address to your server, which makes your server available to other devices
resolve get, post... every method into local files, for ajax
respond files without extension as application/json for ajax
open default browser after server launched
when the server is on, press enter will open the browser
[sudo] npm install -g serve-here
In your local folder, type here and it goes!
here -p 8888
or
here --port 8888
default port is 3000
here -S
or
here --ssl
here -d test
or
here --directory test
default directory is ./
here -w 3
or
here --watch
default interval is 0 second
recommend to set reload interval to page reload time
here -s
or
here --silent
here -l
or
here --log 0
write here.js in server base directory
let db = {
tobi: {
name: 'tobi',
age: 21
},
loki: {
name: 'loki',
age: 26
},
jane: {
name: 'jane',
age: 18
}
};
module.exports = [
{
method: 'get',
path: '/pets',
data () {
let names = Object.keys(db);
return names.map((name) => {
return db[name];
});
}
},
{
method: 'get',
path: '/pets/:name',
data () {
let name = this.params.name;
let pet = db[name];
if (!pet) {
return {
error: `cannot find pet ${name}`
};
} else {
return pet;
}
}
}
];
see koa-router document for more detail
puer not support post, respond files without extension as application/octet-stream
anywhere not support post, and not support reload
browsersync not support post, respond files without extension as application/octet-stream
FAQs
local static server
We found that serve-here 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.