javascript 带数据库的电子应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/51119248/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Electron app with database
提问by gian29
I'm creating a web app for ticket reservation. The only problem is the database. I don't want to tell my client to install XAMPP or set a database, etc.
我正在创建一个用于订票的网络应用程序。唯一的问题是数据库。我不想告诉我的客户安装 XAMPP 或设置数据库等。
Is there any way to package the app with the database?
有没有办法将应用程序与数据库打包?
采纳答案by Jacobm001
SQLiteis a good option for a local database that you can ship with your application. It won't require the user to setup or install any extra dependencies. It's certainly not as full featured as a full on server, but it should be good enough for a local desktop app.
SQLite是您可以随应用程序一起提供的本地数据库的不错选择。它不需要用户设置或安装任何额外的依赖项。它当然不如完整的服务器功能齐全,但对于本地桌面应用程序来说应该足够了。
回答by pubkey
There are many standalone databases you can use with JavaScript and Electron applications. Here are some that I can recommend
有许多独立的数据库可以与 JavaScript 和 Electron 应用程序一起使用。这里有一些我可以推荐的
https://github.com/louischatriot/nedb(last release 4 years ago)
https://github.com/louischatriot/nedb(4年前最后一次发布)
https://github.com/pubkey/rxdb(many features, observable queries)
https://github.com/pubkey/rxdb(很多功能,可观察的查询)
https://github.com/pouchdb/pouchdb(many open issues)
https://github.com/pouchdb/pouchdb(许多未解决的问题)
https://github.com/techfort/LokiJS(only in-memory storage)
https://github.com/techfort/LokiJS(仅内存存储)
https://github.com/typicode/lowdb(good for simple, small datasets)
https://github.com/typicode/lowdb(适用于简单的小型数据集)
回答by swapnil akolkar
It might helpful , if you have web hosting, and you able to write some Ajax and backend system with PHP+ MYSQL. You can write ajax in simple JavaScript or jQuery.
如果您有虚拟主机,并且能够使用 PHP+ MYSQL 编写一些 Ajax 和后端系统,这可能会有所帮助。您可以使用简单的 JavaScript 或 jQuery 编写 ajax。

