Skip to content

volvoxjs/volvox-hapijs-consul-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

volvox-hapijs-consul-sample

volvox.js hapijs and consul sample

Sample

import Volvox from 'volvox-core';
import vconsul from 'volvox-consul';
import vhapi from 'volvox-hapi';
import hapi from 'hapi'

async function main() {
    let server = new hapi.Server();
    server.route({ method: 'GET', path: '/customers', handler: (req, reply) => {
        reply({
            customerName: "Test customer",
            customerId: 666
        });
    }});

    let volvox = new Volvox(vconsul(), vhapi());
    await volvox.bootstrap(server, "customers", "v1");
}

main();

About

volvox.js hapijs and consul sample

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published