const express = require('express')
const app = express()
app.use(express.json())
// demo post endpoint
app.post('/submit', async (req, res) => {
let data = req.body // getting the body request
res.json(data)
})
// Envirnoment variable
require('dotenv').config()
const express = require('express')
const port = process.env.PORT
const app = express()
const cookieParser = require('cookie-parser')
app.use(express.json())
app.use(cookieParser())
router.post('/profile', (req, res) => {
console.log(req.body);
});
app.listen(port, () => console.log(`Server listening on ${port}`))