• Home
  • >
  • Software Development
  • >
  • Getting Started With Node.js on the Hummingboard, a Raspberry Pi Clone – InApps Technology 2022

Getting Started With Node.js on the Hummingboard, a Raspberry Pi Clone – InApps Technology is an article under the topic Software Development Many of you are most interested in today !! Today, let’s InApps.net learn Getting Started With Node.js on the Hummingboard, a Raspberry Pi Clone – InApps Technology in today’s post !

Read more about Getting Started With Node.js on the Hummingboard, a Raspberry Pi Clone – InApps Technology at Wikipedia

You can find content about Getting Started With Node.js on the Hummingboard, a Raspberry Pi Clone – InApps Technology from the Wikipedia website

Javascript’s event-driven model of execution lends itself well to server-side Internet of Things applications, particularly on nanoLinux devices, like the Raspberry Pi or a Hummingboard clone. I have a couple of Hummingboards and they are robust little devices. Since I’m just putting my toe in the Javascript water, the first order of business is that of installation and a quick check to see if I can put something up on a Web page. In a subsequent article I might expand the exploration into more complex Web examples and maybe try some input/output on the GPIO pins of the board.

Installation

Installation is fairly straightforward using the command line. I used a Hummingboard-i2eX with the i.MX6 Dual (2 core) processor, 1 GB of 64-bit 1066 Mbps memory and Debian Linux version 3.0.35. The setup also has a powered 4 port hub, a Logitech wireless keyboard/mousepad and an EdiMax 802.11n USB wireless dongle. Video is handled through the standard HDMI cable out to a Sanyo big screen. Raspberry Pis and their clones all seem pretty sensitive to power requirements, so a powered hub is pretty much a necessity. Use a 5-volt 2 amp wall wart for the Pi and Hummingboard, with a good USB cable, to head off problems.

Read More:   Accelerate App Releases While Minimizing Bugs – InApps 2022

I followed the directions on the justplugin Web site to load node.js on my Hummingboard device. Here are the steps with a bit of commentary:

1. Make a new directory to hold the downloaded nodejs files.

2. Fetch node.js from the Internet.

3. Compile and build the node.js programs.

Even with the dual-core Hummingboard, a fairly fast Internet connection and 1 GB of memory compiling and building the programs, it took about 40 minutes.

4. Install the program on the Hummingboard system.

5. Reboot the Hummingboard.

6. Determine the version of node.js and the module installation programs. These commands also verify that everything is working.

An Exceedingly Simple Example

The Web has tons of examples on how you can get started using node.js with a Raspberry Pi-based machine. I found a little program that simply posts “hello world” to a browser screen using the node.js server. Check the howtonode Web site for complete details and a handful of additional script examples.

1. Here’s the hello-node script from the howtonode site.

2. Put the text in a file and call it hello-node.js, using your favorite command line editor.

3. Start the server and run the script with the following command line:

You’ll get a message that says the server is running on the localhost (127.0.0.1:8000).

4. Punch that IP into your Pi’s browser and the “hello world” message should appear at the top of the screen. You can also see the page from other machines, on the same network by using the IP of Hummingboard. Find it with ifconfig.

In my case, I could see the message from my XFCE Linux Asus notebook when I pointed to the 192.168.1.111:8000 (address of the Hummingboard, on my LAN), in the Chrome browser.

Conclusion

I was happy to find out that it only takes a moderate amount of effort to get node.js running on a Raspberry Pi-based nanoLinux machine. There’s a whole lot of information on the Web about Javascript and it’s a popular language. I’ll take a look at accessing the GPIO pins in a future story.

Featured image via Flickr Creative Commons.

Source: InApps.net

Rate this post
As a Senior Tech Enthusiast, I bring a decade of experience to the realm of tech writing, blending deep industry knowledge with a passion for storytelling. With expertise in software development to emerging tech trends like AI and IoT—my articles not only inform but also inspire. My journey in tech writing has been marked by a commitment to accuracy, clarity, and engaging storytelling, making me a trusted voice in the tech community.

Let’s create the next big thing together!

Coming together is a beginning. Keeping together is progress. Working together is success.

Let’s talk

Get a custom Proposal

Please fill in your information and your need to get a suitable solution.

    You need to enter your email to download

      Success. Downloading...