diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..fb482ca --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'roda' +gem 'puma' diff --git a/README.md b/README.md index 3f7db1c..36d6cd9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,40 @@ # roda-templates Install prereq: sudo apt install puma, sudo gem install roda --no-document +## Setup + +### Prereq installs + +Will need ruby; install it via package manager or a ruby manager like rbenv/ruby-build. Will need the roda gem, and then an application server such as puma (recommended), gunicorn, or passenger. My examples will use system ruby and puma. + +#### Option 1: System wide packages + +With this example, will basically just ignore the project's Gemfile. Debian 12 has a pretty current ruby version, just use it. It will get pulled in as a required package for puma. + +``` +sudo apt install puma ruby-rack +sudo gem install roda +``` + +#### Option 2: Bundler + +Run the bundle command from the project's root directory + +``` +sudo apt install ruby ruby-bundler +bundle install +``` + +## Run it + +In the project root directory: + +``` +puma +``` + +This default to development mode. Run it in production mode with: + +``` +RACK_ENV=production puma +```