
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@john-yuan/dev-server
Advanced tools
A simple server based on express. Can be used to start a static file server very quick. Also support route definition.
A simple server based on express. Can be used to start a static file server very quick. Also support route definition.
This module is published to NPM, you can install it with the following command:
npm i @john-yuan/dev-server
Note that this module is not fully tested, so keep this in mind, before you use it.
Quick start without any options:
var server = require('@john-yuan/dev-server');
server.start();
Start with options:
var server = require('@john-yuan/dev-server');
// The `server.start` method returns an instance of `Express`
var app = server.start({
// The web root directory. If it is a relative path, it is based on process.cwd()
webroot: 'web',
// The path of the index file. It is based on `webroot`
index: 'index.html',
// The host to listen
host: '0.0.0.0',
// The port to listen
port: 8080,
// Whether to try next port (`port` + 1), if the `port` is not available
tryNextPort: true,
// Whether to print access log to console
printAccessLog: false,
// The options passed to express.static
serveStaticOptions: null
}, function () {
// This callback is called after the server is started
// console.log('server statred');
});
// You can define your extra routes here
app.get('/api/test', function (req, res) {
res.send('This is the response of /api/test');
});

FAQs
A simple server based on express. Can be used to start a static file server very quick. Also support route definition.
The npm package @john-yuan/dev-server receives a total of 6 weekly downloads. As such, @john-yuan/dev-server popularity was classified as not popular.
We found that @john-yuan/dev-server 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
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.