Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Create a combo loader node.js app.

yaypie's comboloader takes care of all the heavy lifting here.  I just point to
the current symlink and let it do its thing.
  • Loading branch information...
commit 833c5c0f8f792b0b4ea6a6113436ff8c9479f4a2 1 parent f1a392c
@rockstar authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 app.js
View
21 app.js
@@ -0,0 +1,21 @@
+var combo = require('combohandler'),
+ express = require('express'),
+ app = express.createServer();
+
+app.configure(function() {
+ app.use(express.errorHandler());
+});
+
+app.error(function (err, req, res, next) {
+ if (err instanceof combo.BadRequest) {
+ res.send('Bad request.', {'Content-Type': 'text/plain'}, 400);
+ } else {
+ next();
+ }
+});
+
+app.get('/', combo.combine({rootPath: 'build/www'}), function (req, res) {
+ res.send(res.body, 200);
+});
+
+app.listen(8082);
Please sign in to comment.
Something went wrong with that request. Please try again.