basic formate of code mongodb
//stewp 1.......
const express = require('express');
//step 2......
const app = express();
//step 3 ......
const port = process.env.PORT || 5000;
// middle wire // cors initizialize.
var cors = require('cors')
app.use(cors())
// const ObjectId = require('ObjectId').ObjectId;
//step 4......
app.get('/', (req, res) =>{
res.send('Ema Server is running...')
});
//step 5......
app.listen(port, () =>{
console.log('listening on port', port);
})