npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

m360.mw.nodejs

v0.0.13

Published

M360API NodeJs Middleware with support to ExpressJs, Fastify, and NestJs

Readme

m360.mw.nodejs

The M360 Nodejs Middleware is a dependency that gets consumed by a NodeJs Server built using one of these frameworks Express, Fastify, and NestJs.

The middleware is developed using native NodeJs and includes interfaces that facilitate using it with the above mentioned frameworks.

Installation


Download the M30 Middleware from GIT and install its dependencies using the following commands:

$ npm install m360.mw.nodejs
$ cd m360.mw.nodejs
$ export NODE_ENV=production
$ npm install

Usage


//example using express
const server = require('express')();
const path = require('path');
const M360Mw = require("m360.mw.nodejs");

//add the M360 middleware
server.use(M360Mw({
    'contract': path.normalize(path.join(__dirname, 'contract.json')),
    'ip': "127.0.0.1",
    'type': 'express',
    'server': server,
    'platform': 'manual',
	
    /**
     * The platform designates the type of hosting platform where this microservice will run.
     * By default, the platform supports manual mode and that refers to deploying the microservice in a virtual machine.
     * If this microservice will run in a container, the middleware offers 2 extra options for Docker & Kubernetes.
     */
}));

//using the middleware
server.get('/settings', function (request, reply) {
	
	//the middleware is auto attached to the request
	request.M360.registry.get(null, (error, registry) => {
		if (error) {
			return reply.send(error);
		} else {
			
			let custom = request.M360.custom.get();
			return reply.send({
				"registry": registry,
				"custom": custom
			});
		}
	});
});

// Run the server!
server.listen(4002, '0.0.0.0', function (err, address) {
	if (err) {
		throw err;
	}
	console.log(`server listening on 0.0.0.0:4002`);
});

Containerized Deployment


Deploying on Docker

When deploying on Docker, please provide the extra options below. Without these options, the handshake between the middleware and the gateway will fail, along with any maintenance operation that gets triggered from the console onto this microservice.

Option | Data Type | Mandatory | Description --- | --- | --- | --- platform | String | YES | value equals 'docker' network | String | YES | value equals the docker network attached to this docker service service | String | YES | value equals the name of the docker service containerIP | String | NO | value is the internal IP address of the docker container in the docker service

Example

'platform': 'docker',
'platformOptions': {
    'network': 'mike',
    'service': 'service-express',
    'containerIP': '127.0.0.1'
}

Deploying on Kubernetes

When deploying on Kubernetes, please provide the extra options below. Without these options, the handshake between the middleware and the gateway will fail, along with any maintenance operation that gets triggered from the console onto this microservice.

Option | Data Type | Mandatory | Description --- | --- | --- | --- platform | String | YES | value equals 'kubernetes' namespace | String | YES | value equals the kubernetes namespace where your deployment will run service | String | YES | value equals the name of the kubernetes service that is attached to the your deployment exposedPort | String | YES | value equals the exposed port kubernetes service

'platform': 'kubernetes',
'platformOptions": {
    'namespace': 'mike',
    'service': 'service-express',
    'exposedPort': 30402
}

The Middleware includes examples on how you can consume it with these servers.

These examples are located inside the frameworks folder in this repository.

Reference: M360 Middleware Official Documentation