       articles: articles
     )
 
-app.get '/locales/:lang', (req, res) ->
+server.get '/locales/:lang', (req, res) ->
   API.fetchLocaleStrings(req.params.lang).then res.send.bind res
 
-app.get '/signup', (req, res) ->
+server.get '/signup', (req, res) ->
   DB.isSignupAllowed().then (isAllowed) ->
     if isAllowed
       res.format

    else
      res.sendStatus 404

app.post '/signup', (req, res) ->
  API.signup req.body
    .then (body) ->
      res.format

  ca: fs.readFileSync path.join certsPath, 'chain.pem'

if PROD
  https.createServer(credentials, server).listen 8443, ->
    logger.info 'HTTPS server listening on port 8443...'

server.listen 8081, ->
  logger.info 'Express web server listening on port 8081...'
