Node.JS (+MongoBD) / NW.js / Electron


Getting it to work (Node.js, npm, MongoDB, ExpressJS and KeyStoneJS):

Getting strongloop to work (with working-ish example):

  • For some reason my instance decided to use "test" as database instead of "locatewalmart", no idea why, solved by importing to test
  • To get the provided static content working study add a static web page (alter "routes" and  "files" in middleware.json)
  • Replace 0.0.0.0 with the server domain in locatewalmart.html

NW.js with Microsoft Windows:

  • Getting it to work:
    • Download stable for Windows from nwjs.io
    • Extract to disk (e.g. to C:\NW.js)
    • Create project folder(s)s (e.g. containing package.json and index.html)
    • Create shortcut in project folder to nw.exe with the project folder as parameter (C:\NW.js\nw.exe C:\your\project\folder)
    • Double click the shortcut and your application launches!
  • Build your first NW.js app
  • Minimize to tray (don't forget to add an icon.png)

Electron with Microsoft Windows:

  • Getting it to work
    • Install Node.JS
    • npm install -g electron-prebuilt (this enables "electron" as command line command)
    • Create project folder(s)s (e.g. containing package.json, main.js and index.html)
    • Create shortcut in project folder to electron.exe with the project folder as parameter (C:\Users\Admin\AppData\Roaming\npm\node_modules\electron-prebuilt\dist\electron.exe C:\your\project\folder)
    • Double click the shortcut and your application launches!
  • Quick Start
  • Electron packager
    • npm install electron-packager -g
    • electron-packager "C:\Users\Admin\Documents\Visual Studio 2013\Projects\Electron Klavertje Koe" klavertje-koe --platform=win32 --arch=ia32 --version=0.36.5
    • Create shortcut to "C:\Users\Admin\AppData\Roaming\npm\electron-packager.cmd" in the project directory
    • Double click the shortcut and your application is packaged!
    • Use a batchfile (e.g. electron.bat) doing something similar to see console.log entries of main.js etc.