Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/devteds/e3-apis-on-rails

Source code of the Rails API application created during the course - https://youtu.be/pTgaCgfH6_U
https://github.com/devteds/e3-apis-on-rails

docker docker-compose json-api mysql rails rails-api rails-on-docker rest-api ruby

Last synced: 28 days ago
JSON representation

Source code of the Rails API application created during the course - https://youtu.be/pTgaCgfH6_U

Awesome Lists containing this project

README

        

# README

Learn how to create a Rails API-only application. Create and run with docker.

[Episode video link](https://youtu.be/pTgaCgfH6_U)

[![Episode Video Link](https://i.ytimg.com/vi/pTgaCgfH6_U/hqdefault.jpg)](https://youtu.be/pTgaCgfH6_U)

## Tested on

* macOS - 10.12
* Docker - 1.12.6
* Docker compose - 1.9.0

## Video - Instructions / commands

```
mkdir ~/projs
git clone [email protected]:devteds/docker-rails-template.git blog-api
cd blog-api
rm -rf .git
docker-compose run app rails new . --force --database=mysql --skip-bundle --api
# Edit Gemfile to uncomment to include jbuilder gem
docker-compose build
docker-compose up
# http://localhost:3001
docker-compose run --rm app rails g scaffold post title body:text
docker-compose run --rm app rake db:migrate
# GET http://localhost:3001/posts.json
# POST http://localhost:3001/posts.json with JSON body
```