0.1.0 • Published 7 years ago

virgo-framework v0.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

virgo.

NodeJS application development framework.

sample app.

const app = require('virgo');

// Configure the application.
app.configure({
  port: 1234
});

// Set up services.
app.services({
  sample: config => Promise.resolve({
    message: 'Hello world!'
  })
});

// Set up routes.
app.http.routes(router => {
  router.get('/', (req, res) => {
    res.end(app.service('sample').message);
  });
});

// Boot the application.
app.boot().then(() => {
  app.log.success('Booted successfully!');
}).catch(err => {
  app.log.error(err);
});