Skip to content

volvoxjs/volvox-restify-consul-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

volvox-restify-consul-sample

volvox.js restify and consul sample

Sample

import Volvox from 'microphone-core';
import vconsul from 'microphone-consul';
import vrestify from 'microphone-restify';

import restify from 'restify'

async function main() {
    let server = restify.createServer();
    server.get('/customers', (req, res, next) => {
        res.send({
            customerName: "Test customer",
            customerId: 666
        })
    })
    
    let volvox = new Volvox(vconsul(), vrestify());
    await volvox.bootstrap(server, "customers", "v1");
}

main();

About

volvox.js restify consul sample

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published