Hi, I am using compound and connect-memcached. Below is the content of my envirionment.js file:
module.exports = function (compound) { var express = require('express'); var MemcachedStore = require('connect-memcached')(express); var app = compound.app; require('./mongoose').init(compound); app.configure(function(){ app.use(compound.assetsCompiler.init()); app.use(express.static(app.root + '/public', { maxAge: 86400000 })); app.set('view engine', 'ejs'); app.set('view options', { complexNames: true }); app.set('jsDirectory', '/javascripts/'); app.set('cssDirectory', '/stylesheets/'); app.set('cssEngine', 'stylus'); app.use(express.bodyParser()); app.use(express.methodOverride()); app.use(express.favicon()); app.use(express.logger()); app.use(express.cookieParser()); app.use(express.session({secret: 'AuthenticationSecret', store: new MemcachedStore})); app.use(app.router); }); };
When I start the server by providing the following command:
NODE_ENV=production node .
This starts fine, and I get:
MemcachedStore initialized for servers: 127.0.0.1:11211 AssetsCompiler Precompiling assets: coffee, styl Compound server listening on 0.0.0.0:3000 within production environment
When I request through the browser, I do not receive a response.
The following is the contents of the routes.js file:
exports.routes = function (map) { map.get('api/yourname','names#index') }
In my name controller:
load('application'); action('index', function(req, res) { send({"name": "Senthil"}); });
PS: If I comment on the codes for using connect-memcached and the request through the browser, I get a response.
Thanks for your help in advance.