1.2.0 • Published 6 years ago

apiss v1.2.0

Weekly downloads
11
License
SEE LICENSE IN LI...
Repository
github
Last release
6 years ago

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()

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago