Skip to content

Commit

Permalink
Serve content from minified directory when not developing
Browse files Browse the repository at this point in the history
  • Loading branch information
Edmund von der Burg committed May 4, 2012
1 parent f3ac0ff commit 96a4d06
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

REPORTER = verbose

all: scss clean minify
all: scss minify

scss:
compass compile
Expand Down Expand Up @@ -30,7 +30,7 @@ test-unit:
--reporter $(REPORTER) \
tests/unit

test-selenium:
test-selenium: scss minify
@NODE_ENV=testing ./node_modules/.bin/nodeunit \
--reporter $(REPORTER) \
tests/selenium
Expand Down
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var path = require('path');

module.exports = {
public_dir: 'public-minify',
hosting_server: {
port: 3000,
domain: 'www.vcap.me:3000', // *.vcap.me points to 127.0.0.1
Expand Down
1 change: 1 addition & 0 deletions config/development.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var path = require('path');

module.exports = {
public_dir: 'public',
MongoDB: {
popit_prefix: 'popitdev_',
},
Expand Down
2 changes: 1 addition & 1 deletion hosting-app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ app.configure(function(){
app.register('.txt', expressHogan);
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.static(__dirname + '/../public'));
app.use(express.static(__dirname + '/../' + config.public_dir));

app.use( require('../lib/middleware/config')() );
app.use(masterSelector());
Expand Down
2 changes: 1 addition & 1 deletion instance-app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ app.configure(function(){

app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.static(__dirname + '/../public'));
app.use(express.static(__dirname + '/../' + config.public_dir));

// sessions and auth
app.use( express.cookieParser( config.instance_server.cookie_secret ) );
Expand Down

0 comments on commit 96a4d06

Please sign in to comment.