DerbyJS 是一个 MVC 框架,帮助编写实时,交互的应用。可以运行在 Node.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(); }); });