Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // server.js
- import { getSecret } from './secrets';
- // ... removed for brevity
- const API_PORT = process.env.API_PORT || 3001;
- // db config -- set your URI from mLab in secrets.js
- mongoose.connect(getSecret('dbUri'));
- var db = mongoose.connection;
- db.on('error', console.error.bind(console, 'MongoDB connection error:'));
- // other routes and stuff
Add Comment
Please, Sign In to add comment