Cool-Node
A cool and light weight web framework for Node.js.
框架支持自动路由定向,不再需要手动编写路由; 支持跨协议开发,HTTP 和 WebSocket 共享会话状态,共用接口; 基于多应用模式,可以使用多个子域名来开发多个应用,而只需要启动一个服务器,监听一个端口; 最重要的是,快速开发,快速交付任务。
欢迎来访 GitHUB: https://github.com/Hyurl/cool-node 或者访问主站:http://cool-node.hyurl.com
附上一个 README 中的小示例:
Example
In JavaScript (/App/Controllers/HttpTest.js):
const HttpController = require("./HttpController");
module.exports = class extends HttpController{
index(){
return this.view({
title: "Cool-Node Test",
content: "Hello, World!"
});
}
}
And in the HTML (/App/Views/HttpTest/index.html):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title><%=title%></title>
</head>
<body>
<h1><%-content%></h1>
</body>