Skip to content

A sample project to illustrate running 32bit and 64bit applications running alongside on Raspberry Pi(3B+ or 4)

Notifications You must be signed in to change notification settings

balena-io-experimental/express-mongo-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express and MongoDB example project

To demonstrate the use of a 64-bit container, we’ve developed a sample multi-container project that uses a few different technologies. The main idea is to plot a live chart containing the temperature and humidity of any city in the world.

What you will need:

  • A download of the project from GitHub
  • Software to flash an SD card (balenaEtcher)
  • A free balenaCloud account to setup and manage the Pi Download and install the balena CLI tools - to be installed on your computer, allowing you to install the project code on the Raspberry Pi 4.

You will also need to set up environment variables from the balena dashboard:

Name Value
CITY_LATLNG The code corresponding to the latitude and longitude of the desired city comma separated. Ex: 38.722252,-9.139337.
API_KEY api key retrieved after signing up at https://darksky.net
FREQ Frequency(in minutes) with which to retrieve weather data.

To get the Lat & Long for your city, you can use latlong.net and type the name of the desired city, such as Lisbon or London. On the environment variable, just combine both information comma separated such as 38.722252,-9.139337.

About the project:

The project is divided into three containers:

  • A mongoDB database instance with persistent storage, in which we will store all data.
  • A Python 3 application that fetches the weather information from the Dark Sky API and saves it to the database every minute.
  • Node.js, ExpressJS, and VueJS application that fetches the data from the mongo database and displays it in a chart, which is refreshed automatically every minute.

Note, the express app is based on https://zellwk.com/blog/crud-express-mongodb/

About

A sample project to illustrate running 32bit and 64bit applications running alongside on Raspberry Pi(3B+ or 4)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published