title: Accessing sqlite databases on remote machine with static adress (Electron / Nodejs / fs)
body: <p>I am trying to access an sqlite file on a local area network machine located in "sqlite" folder, on windows file explorer I access it using the IP address "192.168.5.15/sqlite/db.sqlite", however when the electron aplication tries to access it, the path is converted to the local machine path "c:/application ....../192.168 ....".</p>
  
  <p>please how can I just point the file directly using the static IP adress without converting it to local machine path?</p>
  
  <p>here is the code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// login_app.js
  
  var route = require('../../libs/router.js'); //my lib
  
  var dbPath = "192.168.5.15/sqlite/db.sqlite" // here is the path i want to keep it static
  
  function login() {
      var email         = document.getElementById("email").value;
      var password    = document.getElementById("password").value;
  
      if(email == "" || password == ""){
          alert("Please Enter Your email &amp; Password ...");
          return;
      } else{
          var sql = require('sql.js');                            //Import sqLite 
          var fs = require("fs");                                 //Import Files driver
  
          var SHA256 = require("crypto-js/sha256");               //Crypting Library
  
          try {
              var filebuffer = fs.readFileSync(dbPath);   //here is the problem it converts the file to local machine path c:/..../192....
  
              if (filebuffer != null) {
                  var db = new SQL.Database(filebuffer);
              } else {
                  var db = new SQL.Database();
                  console.log("No Database");
              }
  
              // Prepare an sql statement
              var stmt = db.prepare("SELECT * FROM users WHERE email=:emailid");
  
              // Bind values to the parameters and fetch the results of the query
              var result = stmt.getAsObject({':emailid' : email});
              if(result.password == null) alert('Account not existing, please contact Your Administrator ...');
              else{
                  if(SHA256(password) == result.password) {
                      
                      route.data.relocate('dashboard');
  
                  }
                  else alert('Wrong Login credentials, please try again ...');
              }
  
          } catch (e) {
              console.log(e);
          }
  
      }  
  }</code></pre>
  </div>
  </div>
  </p>