Welcome 微信登录

首页 / 脚本样式 / JavaScript / Node.js 服务器端应用开发框架 -- Hapi.js

Hapi.js 是一个用来构建基于 Node.js 的应用和服务的富框架,使得开发者把重点放在便携可重用的应用逻辑而不是构建架构。内建输入验证、缓存、认证和其他 Web 应用开发常用的功能。
示例代码:
var Hapi = require("hapi");// Create a server with a host and portvar server = new Hapi.Server("localhost", 8000);// Add the routeserver.route({ method: "GET", path: "/hello", handler: function (request, reply) { reply("hello world"); }});// Start the serverserver.start();

附上github地址 https://github.com/spumko/hapi