Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

74
Views
enviando JSON usando la publicación pero obteniendo un objeto vacío en lugar de datos

este es mi código que está obteniendo un JSON de la solicitud posterior. He conectado la base de datos en otro archivo y se está conectando cuando envío datos del objeto JSON vacío que se está imprimiendo.

 const express=require('express'); const app =new express() const User=require('../2-mongoose/3-user') require('../2-mongoose/1-basic');// have to add this ccompulsory app.use(express.json())// will convert string into obj app.post('/users',(req,res)=>{ console.log(req.body);// to console.log data sent through json res.send("testing"); // const user=new User(req.body); // user.save().then(()=>{ // res.send(user); // }).catch((error)=>{ // res.status(400).send(error); // }) }) app.listen(8000,()=>{ console.log("server fired off"); })
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!