... NetGet Documentation index

Module

index

Entry point of netGet node module. default exports NetGet defaultHandler exports defaultHandler

View Source index.js, line 1

Example

import NetGet, { defaultHandler } from 'netget';
const netget = new NetGet();
const gateway = netget.Gateway({ host: 'localhost', port: 3000 });
gateway.listen();
gateway.addRoute('example.com', defaultHandler);
gateway.addRoute('sub.example.com', (req, res) => { 
res.send('Hello from sub.example.com!'); }
);

Witness our Seal.
neurons.me