Skip to content
Permalink
Browse files

fix(server): allow application to define express's home route '/' if …

…necessary
  • Loading branch information
jyounce committed Oct 9, 2015
1 parent 7ef154c commit 7a1e472a1066181ac91d216b299de2fe3b41f3a6
Showing with 4 additions and 3 deletions.
  1. +1 −1 src/server/app-defaults.coffee
  2. +3 −2 src/server/init-server.coffee
@@ -8,7 +8,7 @@ module.exports = (server, config) ->
app.use server.express.static server.paths.client
app.use server.middleware.bodyParser.json() # parse application/json

app.get '/', (req, res) ->
app.get '*', (req, res) ->
msg = 'Hello Server!'
return res.send msg unless config.build.client
return res.send msg if config.exclude.spa
@@ -15,7 +15,6 @@ server.app = server.express()
server.middleware = { bodyParser }
server.paths = client: clientDirPath, server: serverDirPath
server.server = require('./start-server') server.app, config
require('./app-defaults') server, config

# load optional http proxy
# ========================
@@ -33,4 +32,6 @@ catch e
else
console.log e # log e if there is an actual error


# load default app configuration
# ==============================
require('./app-defaults') server, config

0 comments on commit 7a1e472

Please sign in to comment.
You can’t perform that action at this time.