Advertisement
OSRSMargins

Untitled

Aug 14th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. const port = process.env.PORT || 3000;
  2.  
  3. //Setup mongoose
  4. const mongoose = require("mongoose");
  5. mongoose.connect("mongodb://heroku_7dl5lkqv:ukou49hgjq420huiga2stqspc5@ds157258.mlab.com:57258/heroku_7dl5lkqv", { useMongoClient: true });
  6. mongoose.Promise = global.Promise;
  7.  
  8. //Setup express
  9. const express = require("express");
  10. const app = express();
  11. app.use(express.static(__dirname + '/public'));
  12. app.set("view engine", "ejs");
  13.  
  14. app.use(require("./controllers"));
  15.  
  16. app.listen(port, () => {
  17. console.log(`Starting server on port ${ port }`);
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement