Node.js 框架組件:flatiron
flatiron 是一款 Node.js 和瀏覽器的框架組件,是一款構建現代化 web 應用適應性很強的框架。flatiron 提供比 Rails 類組件有更豐富配置的框架組件,允許開發者自己添加他們想要的功能組件。
var flatiron = require('flatiron'), app = flatiron.app; app.use(flatiron.plugins.http, { // HTTP options }); // // app.router is now available. app[HTTP-VERB] is also available // as a shortcut for creating routes // app.router.get('/version', function () { this.res.writeHead(200, { 'Content-Type': 'text/plain' }) this.res.end('flatiron ' + flatiron.version); }); app.start(8080);
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!