Skip to content

shams3049/simple-server-node

 
 

Repository files navigation

A Simple Server with Node.js Express

This is a simple skeleton Express server project that works on any of the balena supported devices.

This project serves up "Hello World!" on port :80 of your balena device.

To get this project up and running, you will need to signup for a balena account here and set up a device, have a look at our Getting Started tutorial. Once you are set up with balena, you will need to clone this repo locally:

$ git clone git@github.com:balena-io-projects/simple-server-node.git

Then add your balena application remote repository to your local repository:

$ git remote add balena username@git.balena-cloud.com:username/myapp.git

and push the code to the newly added remote:

$ git push balena master

It should take a few minutes for the code to push. While you wait, lets enable device URLs so we can see the server outside of our local network. This option can be found in the Actions tab in your device dashboard. You'll also need to make sure that local mode is disabled.

Actions Tab

Once the device is updated, you should see this in your logs: log output

Then in your browser you should be able to open the device URL and see the message "Hello World!".

About

Run a simple express server with balena

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 84.2%
  • JavaScript 13.4%
  • CSS 2.4%