Hanami 해봤어요.
개요
하나미가 루비의 구세주가 될지, 멍청한 행성과 함께 흩어질지
DDD(Domain-driven design) 베이스
http://hanamirb.org/
RubyKaigi 2017
해봤어요Getting Started.
전제 조건
Hanami 설치 $ mkdir sample_hanami
$ cd sample_hanami
$ bundle init
$ vim Gemfile
+ gem 'hanami'
$ bundle install --path vendor/bundle
hanami 프로젝트 만들기 $ bundle exec hanami new . --database=mysql
$ bundle install --path vendor/bundle
hanami 서버 시작 $ bundle exec hanami server
브라우저 시작 $ open http://localhost:2300
계속하다 # Action生成
$ bundle exec hanami generate action web books#index
$ bundle exec hanami generate action web books#new
$ bundle exec hanami generate action web books#create
# Model生成
$ bundle exec hanami generate model book
# DB Migrate (migrationsファイルを編集し、必要なカラムを追加する)
$ bundle exec hanami db prepare
샘플 소스 코드
$ mkdir sample_hanami
$ cd sample_hanami
$ bundle init
$ vim Gemfile
+ gem 'hanami'
$ bundle install --path vendor/bundle
$ bundle exec hanami new . --database=mysql
$ bundle install --path vendor/bundle
hanami 서버 시작 $ bundle exec hanami server
브라우저 시작 $ open http://localhost:2300
계속하다 # Action生成
$ bundle exec hanami generate action web books#index
$ bundle exec hanami generate action web books#new
$ bundle exec hanami generate action web books#create
# Model生成
$ bundle exec hanami generate model book
# DB Migrate (migrationsファイルを編集し、必要なカラムを追加する)
$ bundle exec hanami db prepare
샘플 소스 코드
$ bundle exec hanami server
$ open http://localhost:2300
계속하다 # Action生成
$ bundle exec hanami generate action web books#index
$ bundle exec hanami generate action web books#new
$ bundle exec hanami generate action web books#create
# Model生成
$ bundle exec hanami generate model book
# DB Migrate (migrationsファイルを編集し、必要なカラムを追加する)
$ bundle exec hanami db prepare
샘플 소스 코드
# Action生成
$ bundle exec hanami generate action web books#index
$ bundle exec hanami generate action web books#new
$ bundle exec hanami generate action web books#create
# Model生成
$ bundle exec hanami generate model book
# DB Migrate (migrationsファイルを編集し、必要なカラムを追加する)
$ bundle exec hanami db prepare
Reference
이 문제에 관하여(Hanami 해봤어요.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/y-moritake/items/224f44cb5693d6650c7d텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)