Learn How To Install and Get started with HyperApp JS

0
539
HyperApp

In the last article, we discussed about the Hyperapp overview along with a basic example where we explained the concept of View, Action, and State used in building Hyperapp application. We should know that Hyperapp JS is Node.js based front end technology. Therefore, before we can start to build any application on top of Hyperapp JS, we need to install Node.js on our system. Depending on the type of operating systems (i.e. Windows OS, Linux, and Macintosh), we can download suitable Node.js package on our system through the following steps.

• Installation of the Node.js: Node.js installer for Windows or Macintosh can be downloaded from the following link.

Node.js Download link

https://nodejs.org/en/download/

In this article, we are using the windows platform. Therefore, we are going to download Node.js for Windows 64-bit operating system. Once the windows installer is downloaded for the above link, we can simply obey the following steps.

1. Double Click on the installer (node-v4.4.7-x64.msi), you will notice the following dialogue box.

installer node

2. Click on the next button, the installer will display the following dialogue box which will ask you to accept the End-user License Agreement. Check the checkbox at the bottom and click on the Next button.

node agreement

3. You will notice the following dialogue box, which will be asking you to choose the destination folder in order to install the Node.js files. Choose the default destination folder path and click on the Next button shown below.

node destination assigned

4. You will notice the following dialogue box which will ask you to select the custom setup. Keep the default settings and click on the Next button.

node custom setup

5. You will notice the following dialogue box, click on the install button to initiate the installation of the Node.js.

node install

6. Once the installation has completed successfully, you will notice the following dialogue box. Click on the Finish button to finish the installation of Node.js on your windows machine.

complete node

Once the installation of Node.js is completed, then we will create the following required package files in order to configure the project for Hyperapp.js

Installing dependencies including Hyperapp JS

After Node.js has installed on your machine, you need to create a HyperApp JS project with the project root name as “hyperapp-demo”. We can install the required dependencies under the “node_modules” of the current project after creating a file “package. json” with the below details. This should be noted that this file should be present at the project root where we are going to execute the “npm install” command. The “npm install” command will download and install all the required dependencies version present in the “package. json” file as shown below.

Package. json

Next, we take a look at the important file “.eslintrc.js” and the content of this file is shown below. In this file, we specify the required modules to bring up the Node.js application. In the current, Hyperapp JS application, we require the module exports shown below.

Next important file is “webpack.config.js” and below is the content of this file. In this file, we specify the vendor libraries, path, plugins, and module export which we are going to use in this hyperapp application.

Next important file is “index.html”, which is the main file where we are define the title, link the stylesheet (i.e. bundle.css) and pointing the script.

Our entire app will be under ‘./src’ project path which we have already discussed in the last article. Our overall project directories and files structure for Hyperapp application will look as shown below.

Hyper app demo

Lastly, we can execute this app by executing “npm start” at the project root of Hyperapp web application (hyperapp-demo) as shown below.

node code

We can observe that our Hyperapp based web application is running at this URL http://localhost:8080/ on the web browser.

Conclusion: –
In this article, we discussed the installation of Node.js as well as HyperApp JS dependencies in order to get started to work on HyperApp JS application building.

LEAVE A REPLY

Please enter your comment!
Please enter your name here