Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
billy-http-express
Advanced tools
A Billy service that creates an Express 4 HTTP server.
$ npm install billy-http-express
var Application = require('billy');
var HttpService = require('billy-http-express');
var app = new Application();
app.service(HttpService);
app.config('http.port', 8889);
app.start();
The actual server is started after all services have been loaded, so
registering any middleware or setting up of express should happen after this
service via the http
dependencies.
app.service(function MyWebService(http) {
http.use(cookieParser());
http.get('/', function(req, res) {
res.send('Hello, World!');
});
});
This can be done in a separate service following this one, or via specifying a
module via the http.server
config.
New dependencies that you can use after adding this service:
tag | type | description | notes |
---|---|---|---|
http | express | The express application | Setup routes, middleware, etc with this object |
Available config properties:
config | type | description | default value | notes |
---|---|---|---|---|
http.port | number | Port to listen on for HTTP connections | process.env.PORT , 8123 1 | |
http.secret | string | Server-side secret | 'supersecret' | Used for securing cookies. |
http.webroot | string | Path to directory of static files to serve | null | Optional. If not set, will not start the static server. If an array, will serve multiple directories2 |
http.server | function | Server startup module | null | Optional IoC-injected module to start when the server is created. 3 |
http.username | string | HTTP basic auth username | process.env.HTTP_USERNAME , null | If null, any username will be accepted. 4 |
http.password | string | HTTP basic auth password | process.env.HTTP_PASSWORD , null | If null, any password will be accepted. 4 |
1 Will use the PORT
environment variable if available, e.g. on Heroku.
2 The static server is mounted during the start
phase of this
service, meaning all middleware mounted in the setup / constructor function of
other services will have precedence, as will any services that start before this
one.
3 The http.server
module must be set before the app is started
since it is booted with the HTTP service starts.
4 Basic auth will only be enabled if either http.username
or
http.password
is set
$ npm test
MIT
FAQs
A Billy service that creates an Express 4 HTTP server
The npm package billy-http-express receives a total of 1 weekly downloads. As such, billy-http-express popularity was classified as not popular.
We found that billy-http-express 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.