daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest May 16th, 2018 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top