More work stuffs

This commit is contained in:
Dobie Wollert
2014-10-07 03:25:36 -07:00
parent 0a7ad61eb4
commit 060fdbde29
6 changed files with 79 additions and 16 deletions

View File

@ -103,18 +103,24 @@ function startExpress() {
app.use(require('connect-livereload')());
/*
app.use('/api', express.static(__dirname + '/demo', {
index: ['index.json']
}));
app.use('/demo', express.static(__dirname + '/demo'));
app.use(express.static('build'));
*/
/*
app.all('/api/*', function(req, res) {
var url = 'http://localhost:8080' + req.url;
var url = 'http://new.atlb.co/' + req.url;
req.pipe(request(url)).pipe(res);
});
*/
app.all('/images/*', function(req, res) {
var url = 'http://new.atlb.co/' + req.url;
req.pipe(request(url)).pipe(res);
});
app.use(express.static('build'));
app.all('/*', function(req, res) {
res.sendFile('index.html', { root: 'build' });