Guest User

Untitled

a guest
May 16th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. // server.js
  2. import { getSecret } from './secrets';
  3. // ... removed for brevity
  4. const API_PORT = process.env.API_PORT || 3001;
  5.  
  6. // db config -- set your URI from mLab in secrets.js
  7. mongoose.connect(getSecret('dbUri'));
  8. var db = mongoose.connection;
  9. db.on('error', console.error.bind(console, 'MongoDB connection error:'));
  10.  
  11. // other routes and stuff
Add Comment
Please, Sign In to add comment