Skip to content

Latest commit

 

History

History
84 lines (55 loc) · 2.86 KB

CONTRIBUTING.md

File metadata and controls

84 lines (55 loc) · 2.86 KB

Contributing

To contribute to this project, follow the steps below to build the assets and run the server.

  1. Hardware
    1. Operating System
    2. Setup
  2. Software
    1. Environment
    2. Setup
    3. Run

Hardware

Operating System

Download Raspbian Stretch Lite and put it on the SD card by following the installation guide.

Setup

Setup Raspbian by following this guide: Setup a Raspberry Pi to run a Web Browser in Kiosk Mode, but when configuring Open Box, in the Start Chromium in kiosk mode block, replace the sed and chromium-browser commands to call the autostart script from the tasks folder, like this:

# Start Chromium in kiosk mode
su pi -c '/home/pi/nostalgia/tasks/autostart &> /home/pi/nostalgia.log'

This way, when autostart install dependencies and builds assets, they'll have the right user ownership. And the log can be found inside the home folder.

Also, change the hostname with the raspi-config command to nostalgia. The server and some scripts depend on that.

Then, the only thing left to do is to setup the display, by following this guide: HyperPixel 4.0" Drivers. Be aware that after this point, you won't be able to use an HDMI display.

Software

A Unix like operating system, with Node.js 6.4.0 or greater is required for this project.

Environment

Inside the project folder, create a file named .env, with the following content inside:

COMMAND_BROWSER='chromium-browser'
COMMAND_SERVER='node server/main.js'
ENVIRONMENT='development'
FLICKER_ALBUM=''
FLICKER_KEY=''
FLICKER_SECRET=''
FLICKER_USER=''
PORT='8080'

You'll have to request a Flicker API Key to fill the FLICKER_KEY and FLICKER_SECRET variables.

For the other two, FLICKER_ALBUM and FLICKER_USER, you can play with them in the Flicker API explorer.

When running the project inside the Raspberry Pi, change ENVIRONMENT to production.

Setup

Install dependencies with:

npm install

Then, list available tasks with:

make help

Run

You can start hacking with:

make watch

It will build, start the server and watch for changes.