Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@mands/mns-fe-server
Advanced tools
A server, wrapping Express for use within M&S front-end projects.
This module is a wrapper around the node Express.js server. It takes a single configuration object with the following properties:
Name | Type | Description |
---|---|---|
assetsDir | string | Dir to serve static files such as images, CSS files, and JavaScript files |
jsonLogging | function | Function used for logging events, can be used with @mands/mns-fe-foundation/src/components/logger |
logger | boolean | Enable or Disable logging |
routesDir | function | A function that returns the path to the routes directory |
handlebars | object | Handlebars view engine object |
pageNotFoundHandler | function | A mapping to a handler for 404 status events |
errorPageHandler | function | A mapping to a handler for 500 status events |
ExposeRoutes | function | Function which returns a dir with the exposed routes |
To install mns-fe-server
into your application please run:
npm install --save @mands/mns-fe-server
Include the module and start:
const config = require('./configuration/server')
let server = require('@mands/mns-fe-server')(config)
server.start()
Here's an example configuration object to get you started.
Providing a custom middleware is as simple as adding middlewares
method to config/server.js
. For example:
const middleware = require('<path to middleware>');
const middlewares = server => {
server.use(middleware);
}
module.exports = {
middlewares,
analyticsEnv,
env,
routes,
assetsDir,
jsonLogging,
...
...
}
FAQs
A server, wrapping Express for use within M&S front-end projects.
The npm package @mands/mns-fe-server receives a total of 0 weekly downloads. As such, @mands/mns-fe-server popularity was classified as not popular.
We found that @mands/mns-fe-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.