Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/devteds/e3-apis-on-rails
- Owner: devteds
- Created: 2017-01-22T06:24:49.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-21T18:26:40.000Z (almost 8 years ago)
- Last Synced: 2024-11-14T02:37:49.004Z (3 months ago)
- Topics: docker, docker-compose, json-api, mysql, rails, rails-api, rails-on-docker, rest-api, ruby
- Language: Ruby
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```