Super simple 'server' for rendering HTML from an index.html.erb
file, and a data.yml
file.
The instance variable to use in the ERB file is just @data
. Then you can do things like @data.contact.email
.
I just update the file, it's re-generated every second, and I refresh the browser when there's changes I want to see.
Caveats:
- If there's a problem with the command, it's just a blank screen, but the terminal will show you what's going on (usually malformed YAML).
- Sometimes when refreshing it's blank, I think because it's writing the file the same time you're trying to read it. Refreshing again fixes it.