app.post('/signup', async(req, res) => { const { email, firstName } = req.body const user = new User({ email, firstName }) const ret = await user.save() res.json(ret) })
fetch('',{ method:'POST', headers:{ 'content-type': 'application/json' }, body:JSON.stringify(users) }) .then(res=> res.json()) .then(data => console.log(data))