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

161
Views
Guardando una cadena de POST en un archivo mongoDB existente

Creé una solicitud de publicación que recibe una dirección de ethereum de los usuarios del extremo de los usuarios. A continuación, necesito agregar la cadena al registro existente de los usuarios en una base de datos mongoDB.

 app.post('/post', async (req,res) => { res.set({ 'Content-Length': 64 }) res.json(req.body) const address = JSON.stringify(req.body.address) let temp = address.length-2; var walletAddress = address.slice(2, temp) //This is to remove brackets and speech marks from the string walletAddress = utils.getAddress(walletAddress) console.log(walletAddress); res.end("yes"); //saving data in an existing mongodb });

He intentado de muchas maneras diferentes y todas han presentado algún tipo de error.

Lo siento si esto es realmente obvio, soy un novato, pero la ayuda es muy apreciada.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Recomiendo usar el controlador oficial de mongoDB . npm install mongodb

En su repositorio de GitHub

about 4 years ago · Juan Pablo Isaza Report
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!