1. Download node-webkit:https://github.com/nwjs/nw.js
The file directory is as follows:
2: Create a new Package.json in the file directory ( if the file is present, write the following code directly ), One of the simplest content is as follows ( PS: Comment code please delete ):
{
"Main": "index.html",//read-in file of program
"Name": "Sample-app",//the contents of the name by the way write
"Window": {
"Toolbar": false,//whether the menu bar is allowed to appear
"Resizable": false,//whether to allow dragging of window size
"width": 370,//width of window
"Height": 220//height of window
}
}
3, in this directory new index.html, HTML file part code:
4, double-click Run Nw.exe;
5.:
--Node-webkit: The ability to operate local files with Nodejs, as well as the rendering function of the page; have to admire the strong Google
An example of desktop application based on Node-webkit development