Node.js server side application development framework hapi. js
- 2020-03-30 03:38:02
- OfStack
Hapi.js is a rich framework for building node.js based applications and services, allowing developers to focus on portable and reusable application logic rather than building architecture. Built-in input validation, caching, authentication, and other features commonly used in Web application development.
Sample code:
var Hapi = require('hapi');
// Create a server with a host and port
var server = new Hapi.Server('localhost', 8000);
// Add the route
server.route({
method: 'GET',
path: '/hello',
handler: function (request, reply) {
reply('hello world');
}
});
// Start the server
server.start();
Attach a lot address (link: https://github.com/spumko/hapi)