Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

262
Vistas
any way to connect javascript to sqlite3 that is on my raspberryPi?

Im trying to do a small login website(nginx) with a sqlite database on my raspberry but im finding it hard to connect to the database through the javascript to allow login or not.

my login page is a simple html form with a button that should have my function as a onClick.

I hope to be able to connect to database on the onClick script and send the info to the database or retrieve.

(i did something similar with php and mysql a few years back but i cant seem to find a way to do this with javascript and sqlite)

example of my login.js:

function test(){
 const sqlite3 = require('sqlite3').verbose();

 let db = new sqlite3.Database(':memory:', (err) => {
     if (err) {
         return console.error(err.message);
     }
     console.log('Connected to the in-memory SQlite database.');
 });                                                                                           
}

this breaks at the require() i dont quite understand node.js yet but i think it is something related to that.

update 1:

this is the error message -
error message when testing with intelij

after searching a bit more for solutions i think it is something to do with client side javascript or node.js? im a beginner in JS so i dont really understand it.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda