Answers for "basic formate of code mongodb"

1

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);
})
Posted by: Guest on October-25-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language