Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute database #76

Closed
flamusdiu opened this issue Mar 31, 2017 · 5 comments
Closed

Distribute database #76

flamusdiu opened this issue Mar 31, 2017 · 5 comments

Comments

@flamusdiu
Copy link

I was looking at doing Electron with linvodb3. Is there a way to ship a pre-filled database?

@flamusdiu
Copy link
Author

From what I can tell, there isn't a way to write the DB outside of the webpage (see: http://stackoverflow.com/a/35142175). Distributing a pre-filled database would not work.

I could use an form interface to load documents into the DB (in the form of Markdown) for testing.

Is there a way to read a local folder to populate the database? I guess I would need to add documents to something like src\app\docs then move that folder over when it's built.

I require the whole project to be completely offline.

@flamusdiu
Copy link
Author

I cannot read local files directly. The only choice I have is HTTP requests to get each file. I really don't want/need to do this. Looks like I am at a stand still. =(

@Ivshti
Copy link
Owner

Ivshti commented Apr 2, 2017

I think this is kind of out of scope. LinvoDB3 is an abstraction to any leveldown compatible store, so you should either change store to something that allows an offline database to be shipped or indeed pull the files at init time somhow

how big are the files?

@flamusdiu
Copy link
Author

Not sure how big they will be. Probably mostly smaller ones. I created a NodeJS custom command to run and migrate the files from X format to markdown to use in the DB. Then I was converting Markdown -> HTML.

Reasoning for this is because Markdown is similar to write if I was to generate a doc directly then other formats. I have some existing documents that I need to transition over which are a bit large but those shouldn't be that much.

I have considered PouchDB which might work. Thoughts?

@flamusdiu
Copy link
Author

Looks like I am going to use Pouchdb. I rewrote https://github.com/gr2m/spawn-pouchdb-server to work for me as well. Thanks for the support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants