How to use sqlite db with MeteorJS?

I am creating a web application using meteorJS that will use backup data from a third-party application. This backup data is stored in sqlite db format.

What is the best way to copy this sqlite db from Dropbox and use it in meteorJS app.

So far, I have been trying to create a Java rest API that would parse this data and create a text file that meteors can use, but if possible I am looking for a lighter solution based on MeteorJS.

+4
source share
1 answer

Here is the node.js package that can port sqlite to mongo:

https://github.com/davidyaha/sqlite-to-mongo

https://www.npmjs.com/package/sqlite-to-mongo

, mongo, Meteor . - sqlite Meteor . , :

const SqliteToMongo = require('sqlite-to-mongo');

var importer = new SqliteToMongo('db.sqlite', 'mongodb://localhost/dbname');

importer.importCollection('users', {
  tableName : "USERS_TABLE",
  columns: {
    ID: '_id',
    USERNAME: 'username',
    EMAIL : 'profile.email'
  }
});

db.sqlite sqlite mongodb://localhost/dbname . , :

mongodb://localhost:27017/dbname

dbname - . - , "" - (), USERS_TABLE - sqlite. sqlite mongo.

+2

Source: https://habr.com/ru/post/1624954/


All Articles