daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest May 16th, 2018 112 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand