Entry point of netGet node module. default exports NetGet defaultHandler exports defaultHandler
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!'); }
);