For some reason my app cant find a .db file


#1

Hello,
I have a problem with my Sqlite database. For some reason my app cant find .db file which is in app folder. I get no errors but I dont get a result. There is already one record in database

here is my login view model.js:
1 var Sqlite=require(“nativescript-sqlite”);
2 var Observable=require(“data/observable”).Observable;
3
4 exports.createViewModel=function(database){
5 var viewModel=new Observable();
6 viewModel.signIn=function(){
7 database.all(“SELECT * FROM people”).then(rows=>{
8 console.log(rows);
9 });
10
11 }
12 return viewModel;
13 }
14

and here is my login.js:
var Sqlite=require(“nativescript-sqlite”);
2 var createViewModel=require("./login-view.js").createViewModel;
3 var page;
4 exports.onPageLoad=function(args){
5 page=args.object;
6 if(!Sqlite.exists(“db1.db”)){
7 Sqlite.copyDatabase(“db1.db”);
8 }
9 (new Sqlite(“db1.db”)).then(db=>{
10 db.execSQL(“CREATE TABLE IF NOT EXISTS people (id integer PRIMARY KEY NOT NULL,email varchar(50) NOT NULL UNIQUE,password varchar(25) NOT NULL)”).then(id=>{
11 page.bindingContext=createViewModel(db);
12 },error=>{
13 console.log(“CREATE TABLE ERROR”, error);
14 });
15 }, error=>{
16 console.log(“OPEN DB ERROR”,error)
17 });
18 }
~
~