Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/usetrmnl/byos_sinatra
DIY server in Ruby/Sinatra for self hosted screen generation
https://github.com/usetrmnl/byos_sinatra
trmnl
Last synced: 8 days ago
JSON representation
DIY server in Ruby/Sinatra for self hosted screen generation
- Host: GitHub
- URL: https://github.com/usetrmnl/byos_sinatra
- Owner: usetrmnl
- Created: 2024-12-12T21:03:44.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-12-17T05:59:29.000Z (about 1 month ago)
- Last Synced: 2025-01-05T08:46:23.689Z (12 days ago)
- Topics: trmnl
- Language: Ruby
- Homepage: https://docs.usetrmnl.com
- Size: 46.9 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-trmnl - TRMNL DIY server - Self hosted screen generation in Ruby/Sinatra (📄 Official Docs & Quickstarts)
- awesome-trmnl - TRMNL DIY server - Self hosted screen generation in Ruby/Sinatra (📄 Official Docs & Quickstarts)
README
# TRMNL BYOS - Ruby/Sinatra
with this project you can point a TRMNL (https://usetrmnl.com) device to your own server, either in the cloud or on your local network.**requirements**
- TRMNL device
- TRMNL firmware (forked with new base url - your server)
- Ruby installed on your machine**quickstart**
```
bundle # installs gems/libs
rake db:setup # creates db + Devices table
ruby app.rb # => runs server, visit http://localhost:4567
```**debugging / building**
first access the console: `rake console`
```
Device.count # => 0 (interact with db ojects via ActiveRecord ORM)
ScreenFetcher.call (fetch upcoming render)
ScreenGenerator.new("Some HTML here
").process # => creates img in /public/images/generated
```**deploying**
to run TRMNL on your local network only:
1. run app in production mode (`ruby app.rb -e production`)
2. retrieve your machine's local IP, ex 192.168.x.x (Mac: `ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'`)
3. confirm it works by visiting `http://192.168.x.x:4567/devices` from any device also on the network
4. point your [forked FW's](https://github.com/usetrmnl/firmware) `API_BASE_URL` ([source](https://github.com/usetrmnl/firmware/blob/2ee0723c66a3468b969c83d7663ffb3f8322ad99/include/config.h#L56)) to `http://192.168.x.x:4567`to run TRMNL on a cloud server:
TBD