Zero deployment CouchDB embedded in a Windows app?

2019-03-15 12:58发布

I'm probably dreaming here, but am wondering if there's any possibility of completely embedding a minimal CouchDB engine within a Windows application, such that the app can be run without requiring installation (of CouchDB/Erlang) on the user's computer.

4条回答
一纸荒年 Trace。
2楼-- · 2019-03-15 13:20

The CouchDB wiki does provide at least a few tips for Integrating CouchDB into your Windows Applications. YMMV, from what I can tell it's more or less just tips on creating a relocatable build. You'll want to likely generate a solid random admin user/password into the local.ini file during the install process and set up proper permissions on all created databases (to protect against any potential cross-site scripting vulnerabilities) in addition to ensuring the socket binding only happens on the default localhost interface.

查看更多
别忘想泡老子
3楼-- · 2019-03-15 13:32

Why bother. It is so easy to install Erlang on Windows. Just bundle up the whole thing including the erl.exe binary and have your installer unzip it into a folder. The only thing that you would need to change would be the batch files, or better yet, discard them and write your own batch file to start up CouchDb. Also, it is a good idea to use a different port that either the normal Erlang port (or the usual CouchDB port) and maybe even get Erlang to use localhost as its "shortname".

查看更多
该账号已被封号
4楼-- · 2019-03-15 13:39

While not a code solution, you could use one of the bundling applications that can embed files and other files into one executable. One example would be BoxedApp.

查看更多
我只想做你的唯一
5楼-- · 2019-03-15 13:42

I already provide this slimmed down / bundled ability - check here https://github.com/dch/couchdb/downloads and specifically the lean bundle at 16MiB erlang + all couch love here https://github.com/downloads/dch/couchdb/couchdb-1.1.0+COUCHDB-1152_otp_R14B03_lean.7z

Some brief notes on bundling and embedding couchdb on windows at wiki.apache.org/couchdb/Quirks_on_Windows including how to hide the erlang window (erl.exe -detached) at startup.

Ask on CouchDB @user mailing list if you want more info or help while you have a crack at this.

查看更多
登录 后发表回答