Update server.js

This commit is contained in:
Abhijeet Singh 2018-11-30 00:04:34 +05:30 committed by GitHub
parent 13dd4b6376
commit dca8dc92fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ var app = express();
var port = process.env.PORT || 3000;
/** this project needs a db !! **/
// mongoose.connect(process.env.MONGOLAB_URI);
mongoose.connect(process.env.MONGOLAB_URI, { useMongoClient: true });
app.use(cors());
@ -34,4 +34,4 @@ app.get("/api/hello", function (req, res) {
app.listen(port, function () {
console.log('Node.js listening ...');
});
});