var express = require('express') , cors = require('cors') , app = express(); app.get('/products/:id', cors(), function(req, res, next){ res.json({msg: 'This is CORS-enabled for all origins!'}); }); app.listen(80, function(){ console.log('CORS... 続きを読む
README.md Soy Soy is a small library to make it easy to integrate Google Closure Templates with node.js and express. It will now compile your soy templates on launch and pre-cache the files into memory. I would like to give thanks to the auth... 続きを読む
Node.jsExpressでテンプレートからプロジェクトを作ると、現在の最新版2.5.4では . ├── app.js ├── package.json ├── public │ ├── images │ ├── javascripts │ └── stylesheets │ └── style.css ├── routes │ └── index.js └... 続きを読む
node.js, socket.io, expressSocket.IO のサーバは v0.7 からスタンドアローンでも立てられるようになりましたが、Express のサーバ上に Socket.IO のサーバを同居させる構成は多いと思います。しかし Socket.IO は Express が HTTP で確立したセッションとは別... 続きを読む
Express is a great web development framework for node.js. It provides easy access to stuff like routing, requests and sessions. socket.io is an abstraction layer for Websockets, with Flash and XHR fallbacks, that runs in both node.js and the ... 続きを読む