Skip to content

twnzl/nanium-channel-express

Repository files navigation

nanium-channel-express

A nanium request channel based on express using a single endpoint.

DEPRECATED:
This package is no longer necessary. the NaniumHttpChannel from core package nanium now also excepts an express-like app for its configuration property "server".

Install

npm install nanium-channel-express

Usage

import { Nanium } from 'nanium/core';
import { NaniumExpressHttpChannel } from 'nanium-channel-express';
import * as express from 'express';

const expressApp: express.Express = express();

await Nanium.addManager(new NaniumNodejsProvider({
	requestChannels: [
		new NaniumExpressHttpChannel({
			apiPath: '/api',
			server: expressApp
		})
	]
}));

This creates a single endpoint '/api' where requests can send via HTTP POST.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published