Skip to content

Instantly share code, notes, and snippets.

@joergd
Created July 10, 2012 05:18
Show Gist options
  • Save joergd/3081252 to your computer and use it in GitHub Desktop.
Save joergd/3081252 to your computer and use it in GitHub Desktop.
>: nodemon server.js
10 Jul 07:16:08 - [nodemon] v0.6.20
10 Jul 07:16:08 - [nodemon] watching: /Volumes/dev/hatchet
10 Jul 07:16:08 - [nodemon] starting `node server.js`
info: socket.io started
Express server listening on port 5000 in production mode
"jquery.cookie.js+underscore.min.js+angular.min.js+modernizr-custom.min.5364751608000.js" not modified and is already stored on S3
"bootstrap.min.css+app.2682176564000.css" was not found on S3 or was modified recently
"app.js+controllers.js+directives.js+filters.js+services.6708214351000.js" not modified and is already stored on S3
/Volumes/dev/hatchet/node_modules/express-cdn/lib/main.js:33
throw new Error('CDN: ' + msg);
^
Error: CDN: Error: connect ECONNREFUSED
at /Volumes/dev/hatchet/node_modules/express-cdn/lib/main.js:33:9
at /Volumes/dev/hatchet/node_modules/express-cdn/lib/main.js:139:14
at /Volumes/dev/hatchet/node_modules/async/lib/async.js:190:13
at /Volumes/dev/hatchet/node_modules/async/lib/async.js:88:21
at /Volumes/dev/hatchet/node_modules/async/lib/async.js:187:17
at Request._callback (/Volumes/dev/hatchet/node_modules/express-cdn/lib/main.js:245:5)
at /Volumes/dev/hatchet/node_modules/express-cdn/node_modules/request/main.js:120:22
at Request.<anonymous> (native)
at Request.emit (events.js:67:17)
at ClientRequest.<anonymous> (/Volumes/dev/hatchet/node_modules/express-cdn/node_modules/request/main.js:223:10)
10 Jul 07:16:12 - [nodemon] app crashed - waiting for file changes before starting...
<%- CDN([ '/css/bootstrap.min.css', '/css/app.css' ]) %>
var options = {
publicDir : path.join(__dirname, 'app')
, viewsDir : path.join(__dirname, 'app')
, domain : 'assets.hatchetapp.net'
, bucket : 'hatchetapp'
, key : 'AKIAIQBPSC6SHF7PCQIA'
, secret : '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'
, hostname : 'hatchetapp.net'
, port : 1337
, ssl : false
, production : siteConfig.packAssets
};
// Initialize the CDN magic
var CDN = require('express-cdn')(app, options);
app.configure(function(){
app.set('views', __dirname + '/app');
app.set('view engine', 'ejs');
app.set('view options', {
layout: false
});
app.use(express.logger());
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.staticCache());
});
app.configure('development', function(){
app.use(express.static(__dirname + '/app'));
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});
app.configure('production', function(){
var oneDay = 86400000;
// app.use(assetsManagerMiddleware);
app.use(gzippo.staticGzip(__dirname + '/app', { maxAge: oneDay, clientMaxAge: oneDay }));
app.use(express.errorHandler());
});
// Add the dynamic view helper
app.dynamicHelpers({ CDN: CDN });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment