hapi.js

Updates Tutorials API Community Plugins Contribute Resources Need Help? $ npm install hapi Current version: 16.1.1 ● Latest update: 2017-04-16T22:11:10Z ● Downloads last month: 279,450 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 . Start by creating a package.json : npm init Install hapi and save it to your package.json dependencies: npm install hapi --save Create a server.js file with the following contents: ' use strict ' ; const Hapi = require ( ' hapi ' ); // Create a server with a host and port const server = new Hapi.Server (); server.connection({ host: ' localhost ' , port: 8000 }); // Add the route server.route({ method : ' GET ' , path : ' /hello ' , handler : function ( request , reply ) { return reply( ' hello world ' ); } }); // Start ...

Linked on 2017-05-09 18:55:09 | Similar Links