Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ryosk7/colorbuz-server

This is colorbuz application for server.
https://github.com/ryosk7/colorbuz-server

Last synced: about 1 month ago
JSON representation

This is colorbuz application for server.

Awesome Lists containing this project

README

        

# README

## Setup
```
$ docker-compose build
$ docker-compose up
$ docker-compose run web rails db:create
$ docker-compose exec web rails db:migrate
# If your PC is Mac, you can use under command.
$ open http://localhost:8000
```

## For starter
```
$ docker-compose build
$ docker-compose up
$ docker-compose run web rails db:create
$ docker-compose exec web rails g scaffold posts
$ docker-compose exec web rails db:migrate
# If your PC is Mac, you can use under command.
$ open http://localhost:8000/posts
```

## DB操作
以下に統一すること
```
# 新規にtableを追加する時
$ docker-compose exec web rails g model Sample string:sample
$ docker-compose exec web rails db:migrate

# 既存のtableに変更を加える時
# 対象のtableのmigrationファイルに変更を加えて、
$ docker-compose exec web rails db:migrate:reset
```

## cURL操作
```
$ curl -X POST http://localhost:8000/posts -d 'post[title]sample&post[content]Hello World!'
```