O'Reilly logo

Node.js Blueprints by Krasimir Tsonev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing the base of the application

Before starting the actual implementation of our file browser, we must prepare the HTML layout, the base of the JavaScript part, and the package.json file.

Writing the package.json file

The package.json file should be placed in the main path of the project. It's a file with content similar to the following code:

{
  "name": "FileBrowser",
  "main": "index.html",
  "window": {
    "toolbar": true,
    "width": 1024,
    "height": 800
  }
}

We already discussed the name and main properties. The window object is a desktop-specific setting; it tells node-webkit how the main application's window should look. In the preceding code, we set only three properties. The width and height properties defines the window size and toolbar hides or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required