Update server.js
This commit is contained in:
parent
13dd4b6376
commit
dca8dc92fd
@ -12,7 +12,7 @@ var app = express();
|
|||||||
var port = process.env.PORT || 3000;
|
var port = process.env.PORT || 3000;
|
||||||
|
|
||||||
/** this project needs a db !! **/
|
/** this project needs a db !! **/
|
||||||
// mongoose.connect(process.env.MONGOLAB_URI);
|
mongoose.connect(process.env.MONGOLAB_URI, { useMongoClient: true });
|
||||||
|
|
||||||
app.use(cors());
|
app.use(cors());
|
||||||
|
|
||||||
@ -34,4 +34,4 @@ app.get("/api/hello", function (req, res) {
|
|||||||
|
|
||||||
app.listen(port, function () {
|
app.listen(port, function () {
|
||||||
console.log('Node.js listening ...');
|
console.log('Node.js listening ...');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user