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

263
Views
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
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!