<%= @name %> service¶ ↑
Commands¶ ↑
natra -v # Show Natra version number natra help [COMMAND] # Describe available commands or one specific command natra new APP-NAME # Creates a new Sinatra application natra model NAME # Generate a model natra controller NAME # Generate a controller natra scaffold NAME # Generate a model with its associated views and controllers
The controller generator also have an optional views flag --no-views
to create controllers without views.
Using Natra
¶ ↑
To generate your app:
natra new APP-NAME
After natra is done generating your app, run bundle install
from your app's directory:
cd APP-NAME bundle install
Development¶ ↑
This project is configured to run in Docker containers facilitated by docker-compose
. nib is our tool of choice for interacting with docker-compose
in development.
Running the app¶ ↑
Use nib to build and start up the web app.
nib build --pull nib up
Running Tests¶ ↑
The app is configured to use guard facilitate running the tests as files change. To start up guard run:
nib guard web
Alternatively the specs can be run as a one-off with:
nib rspec web