Skip to content

Commit

Permalink
Updating README for balena push
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Gareth Davies gareth@balena.io
  • Loading branch information
garethtdavies committed Nov 1, 2019
1 parent cc430c4 commit 01835c3
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,14 @@ This is a simple skeleton Express server project that works on any of the [balen

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][signup-page] and set up a device, have a look at our [Getting Started tutorial][gettingStarted-link]. 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][local-mode] is disabled.
To get this project up and running, you will need to signup for a balena account [here][signup-page] and set up an application and device. You'll find full details in our [Getting Started tutorial][gettingStarted-link].

![Actions Tab](/img/enable-public-URLs.png)

Once the device is updated, you should see this in your logs:
![log output](/img/log-output.png)

Then in your browser you should be able to open the device URL and see the message "Hello World!".
Once you have downloaded this project, you can `balena push` it using the [balenaCLI][balena-cli]. This command will package up and push the code to the balena builders, where it will be compiled and built and deployed to every device in the application fleet. When it completes, you'll have a node.js web server running on your device and see some logs on your [balenaCloud dashboard][balena-dashboard].

To give your device a public URL, access the device page on the [balenaCloud dashboard][balena-dashboard], and choose the _Public Device URL_ toggle. Alternatively, you can point your browser to your device's IP address.

[balena-link]:https://balena.io/
[signup-page]:https://dashboard.balena-cloud.com/signup
[gettingStarted-link]:http://balena.io/docs/learn/getting-started/
[local-mode]:https://www.balena.io/docs/learn/develop/local-mode/
[balena-cli]:https://www.balena.io/docs/reference/cli/
[balena-dashboard]:https://dashboard.balena-cloud.com/

0 comments on commit 01835c3

Please sign in to comment.