apiss
v1.2.0
Published
APISS
Downloads
1
Readme
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.