To contribute to this project, follow the steps below to build the assets and run the server.
- Raspberry Pi: model 3B+, 3, 2, B+, A+, Zero or Zero W
- HyperPixel 4.0: touch or non-touch
Download Raspbian Stretch Lite and put it on the SD card by following the installation guide.
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.
A Unix like operating system, with Node.js 6.4.0 or greater is required for this project.
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
.
Install dependencies with:
npm install
Then, list available tasks with:
make help
You can start hacking with:
make watch
It will build, start the server and watch for changes.