5

This is my first time with Node Webkit. At this point I have all the static parts of my desktop app (built on html, css, js).

However to make it functional, I require to store and retrieve user inputs from a database and/or files.


How can I accomplish this and which is a better option (database or files or both)?

I also wish to know what database engine(s) does nw.js support and if at all there are any GUI tools to setup that database.

enter image description here

Any help is greatly appreciated.

Ashesh
  • 3,499
  • 1
  • 27
  • 44

1 Answers1

1

node-webkit (nw.js) has support of internal and third party modules for node.js. You could install any npm and use it in nw.js apps. There is guide how to do that in official nw.js documentation: Using Node modules

Depending of what you need (e.g. storing user credentials in external database or locally in files or database) you should pick solution that suits your needs.

There are a lot of npm packages to access databases which you could find in nmp repository

Pawel Hawro
  • 1,291
  • 9
  • 11
  • helpful links! I think I have found my answer (http://stackoverflow.com/questions/5818312/mysql-with-node-js). Could you also put some light on the use of GUI tools to create and modify DBs such as phpMyAdmin, can i use them with nodejs-mysql module? – Ashesh Mar 08 '15 at 23:21
  • You could use any tool that is designed to connect and manage mysql. phpMyAdmin require to run full php stack to use. I will advice to use app native to your OS, such as [MySQL Workbench](http://dev.mysql.com/downloads/workbench/) or [HeidiSQL](http://www.heidisql.com/). Tool used to manage DB is not tied in any way with npm which you use to connect to DB in your application. – Pawel Hawro Mar 08 '15 at 23:36
  • I guessed so, but wanted to confirm. Thank you for your prompt reply. Accepting this as answer. – Ashesh Mar 08 '15 at 23:44