We are going to create a simple application using Neutralinojs. This sample application will display Hello with the current username of your operating system. For example, if the current username is Shalitha, it will show, Hello Shalitha.
You need to install neu CLI to create Neutralinojs applications. However, you can develop applications without CLI as well. But, the CLI will make some hard stuff easy. Run the following command on your terminal to install neu CLI globally.
Enter the following command to scaffold a new app.
The above command will create a new app inside myapp directory. To make sure whether everything is fine, Run your application.
If you are on Windows, you might get an empty white screen. The reason is that accessing localhost from a UWP context is disabled by default. Run the following command with administrative privileges on the command prompt.
You may include this in your Windows setup files (with the user's consent) because users also may get an empty white screen on Windows.
Insert the following content into your application resource files.
As mentioned above, you can use the
run command to start your application.
Congrats! your application works.
For debugging purposes, you can use
neu listen command.
listen command will reload your application when there is a change in application resources.
To make portable binaries for your application, we can use the build command. Enter the following command on your terminal to make final binaries.
The above command will produce binaries for all platforms into the
This command will do the work blazing fast because there is no compilation process behind.
Now you know how to create Neutralinojs applications. We will suggest you to look into the following topics next.