UNPKG

fwsp-hydra-express

Version:

A module which wraps Hydra and ExpressJS to provide an out of the box microservice which can support API routes and handlers.

15 lines (13 loc) 339 B
const config = require('./properties').value; const hydraExpress = require('../index'); hydraExpress.init(config, () => { hydraExpress.registerRoutes({ '/v1/hello': require('./hello-v1-api') }); }) .then((serviceInfo) => { console.log('serviceInfo', serviceInfo); }) .catch((err) => { console.log('err', err); });