A rich framework for building applications and services

hapi enables developers to focus on writing reusable application logic instead of spending time building infrastructure.

$ npm install hapi -g

Current version: v8.0.0-rc4 ● Latest update: 2014-11-27T04:17:38Z ● Downloads last month: 73,472

hapi days are coming!


hapi's stability and reliability is empowering these companies today:

See more

Are you using hapi too? Let us know.

Visit us on IRC in #hapi on freenode.

Getting started

Start by creating a package.json:

npm init

Install hapi and save it to your package.json dependencies:

npm install hapi --save

Create an index.js file with the following contents:

var Hapi = require('hapi');

// Create a server with a host and port
var server = new Hapi.Server('localhost', 8000);

// Add the route
    method: 'GET',
    path: '/hello',
    handler: function (request, reply) {

        reply('hello world');

// Start the server

Launch the application by running node . and open localhost:8000/hello in your browser.

Read more about getting started with hapi