Page 1 of 1

How to run a SB-WebApp as a Desktop-Application

Posted: Sun Feb 11, 2018 12:23 pm
by Peter

here is a tip how to run a SpiderBasic-WebApp as an application on the desktop (Windows, Linux, MacOS):

Getting Started:

Download NW.js ( and unpack it at a location of your choice.

Create a new folder named "www" in the unzipped folder.

Create a file called "app.js" in the main folder with the following content:

Code: Select all
var win ='./www/index.html', {
  position: 'center',
  width: 1000,
  height: 800,
  focus: true

Also in the main folder create a file named "package.json" with the following content:

Code: Select all
  "name": "HelloWorld",
  "main": "app.js"

Create a new file in SpiderBasic:
Code: Select all
Debug "HelloWorld!"

Then select Compiler -> Create App -> Call Web from the menu bar.

Enter the following values:

App Name: HelloWorld
HTML filename: [pathtoyourNwJsfolder]/wwww/index. html
JavaScript filename: HelloWorld. js

Check "Copy SpiderBasic library" and "Enable debugger".

Press "Create App".

Then change to the NwJs folder and start the executable file there:


SpiderBasic NwJs - Modules:

NW.js is easy to control from SpiderBasic. For this I have written some JavaScript wrappers in form of modules, which can be downloaded here:

For example, if you want to resize the window, you can bind the module and call NwJsWin::ResizeTo() with the corresponding values.


Since NW.js has a' built-in' NodeJS, you can also use appropriate commands (such as those of the filesystem) to communicate from SpiderBasic with the 'outside world' (SpiderBasic modules NwJsOs, NwJsFs, NwJsClipboard).

Just give it a try. :)

Have fun... Peter

Re: How to run a SB-WebApp as a Desktop-Application

Posted: Mon Feb 12, 2018 9:58 am
by Dirk Geppert
Great! Lots of new possibilities! Thanks Peter!