Derby.js hello.js 介绍
DerbyJS 是一个 MVC 框架,帮助编写实时,交互的应用。可以运行在
Node.js 或者浏览器环境中。
示例代码:
hello.js
var app = module.exports = require('derby').createApp('hello', __filename); app.loadViews(__dirname); // the route is being rendered both on server and client side app.get('/', function(page, model) { // subscription enables data synchronization model.subscribe('hello.message', function() { page.render(); }); });
Derby.js hello.js 官网
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。