From 6780feafa67ad8455fe49af843a540f467164978 Mon Sep 17 00:00:00 2001 From: vanyauhalin Date: Tue, 13 Jun 2023 14:30:12 +0400 Subject: [PATCH] ruby: add recipes to start the server --- web/documentserver-example/ruby/Makefile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/web/documentserver-example/ruby/Makefile b/web/documentserver-example/ruby/Makefile index 8a3ee38e..330c7691 100644 --- a/web/documentserver-example/ruby/Makefile +++ b/web/documentserver-example/ruby/Makefile @@ -1,17 +1,29 @@ .DEFAULT_GOAL := help .PHONY: help -help: # Show help message for each of the Makefile recipes. - @grep -E "^[a-z]+: #" $(MAKEFILE_LIST) | \ - sort | \ +help: # Show help message for each of the Makefile recipes. + @grep -E "^[a-z-]+: #" $(MAKEFILE_LIST) | \ + sort --dictionary-order | \ awk 'BEGIN {FS = ": # "}; {printf "%s: %s\n", $$1, $$2}' -.PHONY: install -install: # Install dependencies and initialize the project. +.PHONY: dev +dev: # Install development dependencies and initialize the project. @bundle install @bundle exec tapioca init +.PHONY: dev-server +dev-server: # Start the development server on localhost at $PORT (default: 3000). + @bundle exec rails server + .PHONY: lint -lint: # Lint the source code for style and check for types. +lint: # Lint the source code for style and check for types. @bundle exec rubocop @bundle exec srb tc + +.PHONY: prod +prod: # Install production dependencies. + @bundle install --without development doc test + +.PHONY: prod-server +prod-server: # Start the poruction server on 0.0.0.0 at $PORT (default: 3000). + @bundle exec rails server --environment production