ruby: add recipes to start the server

This commit is contained in:
vanyauhalin
2023-06-13 14:30:12 +04:00
parent 23b4ffc104
commit 6780feafa6

View File

@ -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