A rails app powering ⚡️ the API portion of kegcop.chrisrjones.com
- Ruby 2.6.3
- Ngnix 1.10.3
- Puma 3.12.4
- JS Runtime: Node.js (V8)
echo "rvm use [RUBY_VERSION_DEFINED_FOR_THIS APP]"
echo "as of March 4, 2020 👇"
rvm ues 2.6.3
ssh-agent
ssh-add ~/.ssh/id_rsa
cap production deploy
Keep bundler ≤ 1.17.x in order to deploy a rails 4.2.x app
the below error will be rendered in a browser if a secrets.yml
file is not present
An unhandled lowlevel error occurred. The application logs may have details.
- Postgres
- ImageMagick
httpie is a sensible alternative to using
curl
To test the following documents
endpoint in this application
curl -I localhost:3000/documents
The above curl
request will print just the headers for the documents
endpoint.
The -X
flag specifies the command request, ie. GET
, POST
, DELETE
, PATCH
.
To execute a GET
request on an endpoint
curl http://localhost:3000/documents
To force a JSON
response from an endpoint
curl --header "Accept:application/json" http://localhost:3000/documents
To include the headers in the response, use -i
flag.
To test sending a csv
file to the csv_files endpoint
curl -X POST -F "csv_file=@/path/to/mr-fancy-pants.csv" localhost:3000/documents
The above curl
command should successfully send a file to the documents
endpoint.
-
deploy app to heroku -
exp with ruby 2.6.5, and possibly upgrade app to use ruby 2.6.5 -
flesh out README