Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. 2016-12-06T05:35:24.065512+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=campusoja.herokuapp.com request_id=8f08ec84-8083-4623-9b40-9cb2aea7a695 fwd="41.190.2.54" dyno= connect= service= status=503 bytes=
  2. 2016-12-06T05:35:26.531859+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=campusoja.herokuapp.com request_id=7cd2a45f-b083-41b8-8c3b-bc46ab35629d fwd="41.190.2.54" dyno= connect= service= status=503 bytes=
  3.  
  4. import express from 'express';
  5. import http from 'http';
  6. import bodyParser from 'body-parser';
  7. import mongoose from 'mongoose';
  8. import config from './config';
  9. import routes from './routes';
  10.  
  11. let app = express();
  12.  
  13. app.server = http.createServer(app);
  14.  
  15. //parse json
  16. app.use(bodyParser.json({"limit": config.bodyLimit}))
  17.  
  18. //passport config
  19.  
  20. //api routes
  21.  
  22. //middlewares intercepts to handler before it gets to the ..
  23. app.use('/api/v1', routes);
  24.  
  25. app.server.listen(config.port);
  26.  
  27. console.log(`Started server on port ${app.server.address().port}`);
  28.  
  29. export default app;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement