Update readme.md

This commit is contained in:
James 2023-12-27 19:09:35 -06:00
parent 2151565e9c
commit 971c5f2233

View file

@ -4,15 +4,11 @@ For the single file app template, really the only file you need is the config.ru
## Views ## Views
Next iteration: In this template, I've taken the single-file template and split up the config.ru to put routes and app logic in app.rb and call on templates to render proper html pages. `tilt` and `erubi` gems are added to do the rendering, and `rack-unreloader` gem is added to have puma automatically load file changes while running in development mode.
adding plugin csrf, and maybe public, assets My example html layout uses [Bulma](https://bulma.io/) to make it easier to make modern looking webpages.
split out app routes from config.ru
set up view templates
add unreloader
future iterations will add database, then authentication
Next Roda app template iterations will add database, then authentication.
## Setup ## Setup
@ -69,8 +65,8 @@ This has puma reload with any file changes while you are working on the app, whe
Basically, you require the app from the config.ru, and then within you app files, any "require_relative" will be "Unreloader.require" instead, plus you do need to include the file extension. Basically, you require the app from the config.ru, and then within you app files, any "require_relative" will be "Unreloader.require" instead, plus you do need to include the file extension.
In config.ru, the "dev =" line stores true or false depending on the RACK_ENV environment variable (see above for changing from default development). Then the ":reload=>dev" uses the dev variable to tell Unreload to reload files or not. Lastly the "run" command uses dev variable to choose between running Unreloader, or bypass Unreloader and run App like normal in production. In config.ru, the `dev =` line stores true or false depending on the RACK_ENV environment variable (see above for changing from default development). Then the `:reload=>dev` uses the dev variable to tell Unreload to reload files or not. Lastly the `run` command uses the dev variable to choose between running Unreloader, or bypass Unreloader and run App like normal in production.
## Additional credit ## Additional credit
I took a lot of inspirations from Jeremy Evans [roda-sequel-stack](https://github.com/jeremyevans/roda-sequel-stack). Jeremy Evans is the author of Roda and also Unreloader, Sequel, and a ruby core contributor. I took a lot of inspirations from Jeremy Evans [roda-sequel-stack](https://github.com/jeremyevans/roda-sequel-stack). Jeremy Evans is the author of Roda and also Unreloader, Sequel, and a ruby core contributor, among other things.