Skip to content

ziyasal/volvox-restify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

volvox-restify

Restify.js provider for volvox.js Microservice framework

Build Status Coverage Status

Preview

Sample code Consul

import Volvox from 'volvox-core';
import vconsul from 'volvox-consul';
import vrestify from 'volvox-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();