Giter VIP home page Giter VIP logo

booking-pi-frontend's Introduction

Room Bookings, Pi Frontend

This is the frontend application for the Raspberry Pi setup that connects to the Booking API. If you don't have an instance of the the API hosted anywhere on the web, you will need to do that first.

Step 1

You will need a Raspberry Pi running Node 7 that you can boot into Kiosk mode on startup. Follow these Raspberry Pi Kiosk setup instructions using this repo as the one you clone down.

Step 2

Once you have the Pi running the kiosk setup, you will need to add an extra environment variable.

Open your server.service file:

sudo nano /etc/systemd/system/node-server.service

Below the line Environment=NODE_ENV=production add another environment variable that links to the URL of your API application. This will allow the PI to connect to the right database.

Environment=API_URL=http://url-to-your-booking-api.com

Step 3

The PI uses the API by using the rooms ID from the MongoDB on the end of it's URL. For example, if your room looked like the following, then your url would be http://localhost:4000/12345678:

{
  id: '12345678',
  name: 'Discovery One'
}

So, open your autostart file:

nano /home/pi/.config/lxsession/LXDE-pi/autostart

And amend the following line by adding your room ID on the end:

@chromium-browser --kiosk --incognito http://localhost:4000/12345678

Environment Variables

API_URL = The URL to your API application.
PORT = Defaults to 4000

booking-pi-frontend's People

Contributors

abbott567 avatar gunjam avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

eva01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.