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

478
Views
¿Cómo enviar datos de frontend a backend? - Nodo.js

Tengo un proyecto donde tengo go-karts y tengo usuarios. Cada usuario obtendrá un go-kart, pero para eso tengo que poner ambos conjuntos de datos en una base de datos. El usuario ya está en él, pero no puedo poner los karts porque es un archivo separado en la carpeta pública.

Mi estructura de carpetas se ve así:

 -contollers -auth.js (Here is the database code for the users) -node_modules -public -img -style -js -gokart.js (I would like to send one or two pieces of this data to the database) -routes -auth.js -pages.js -views -gokart.hbs -register.hbs -index.hbs -login.hbs app.js

El archivo de go-kart se ve así:

 var ros = new ROSLIB.Ros({ url:'ws://10.0.2.15:9090' }); ros.on('connection',function(){ console.log("Connected to websocket server") }); ros.on('error',function(){ console.log("Error connecting to websocket server: ",error) }); ros.on('close',function(){ console.log("Connection to websocket server closed.") }); var gokarts = new ROSLIB.Topic({ ros:ros, name:"/dwm1001/tag5617", messageType:"dwm1001/anchor" }); var myChart; let canvas = document.getElementById('myChart'); let ctx = canvas.getContext('2d'); function init(){ myChart = new Chart(ctx, { type: 'scatter', data: { datasets: [{ label: 'GOKART moving', backgroundColor: "blue", data: [], }] }, options: { responsive: false, aspectRatio: 1, maintainAspestRatio: true, scales: { xAxes: [{ ticks:{ stepSize:2, suggestedMax:18, } }] , yAxes: [{ ticks:{ stepSize:2, suggestedMax:18, } }] } } }); } init(); gokarts.subscribe(function(message) { myChart.data.datasets[0].data.push({x:message.x.toFixed(2), y:message.y.toFixed(2); myChart.update(); });

Quiero poner gokarts.name y gokart.messageType del go-kart en una base de datos. (Usé mysql)

¡Gracias por las ideas!

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!