Nitrogen Peroxide Monoxide

apiss

1.2.0 • Public • Published

APISS

Application programming interface service server. A server-less-ish styled handler for multiple domains.

Notes

vhosts can be accessed by sub-domain and dropping the periods or by the domain its self (curl -H 'Host: test.com' localhost:8080)

Example

const Path = require('path');
const Apiss = require('apiss');
 
const server = new Apiss({
    path: Path.join(__dirname, 'vhosts')
});
 
await server.open();
 
console.log(`uri: ${server.server.info.uri}`);
console.log(`address: ${server.server.info.address}`);

API

new Apiss(options)

  • port: Number (Default: 0)
  • host: String (Default: localhost)
  • instances: Number (Default: Os.cups().length)
  • path: String (Default: ./vhosts) Path to a folder containing folders which contain an index.js file with an array of exported Hapi.js route objects. The virtual host and cors origin is set for each folder based on the folder name.

Apiss.open()

Apiss.close()

Keywords

none

install

npm i apiss

Downloadsweekly downloads

4

version

1.2.0

license

SEE LICENSE IN LICENSE

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability