Git Product home page Git Product logo

motyhub's Introduction

motyhub

Database setup

Postgresql を使う。事前にサーバーを起動しておく。

$ psql -c "SELECT 1;"
 ?column?
----------
        1
(1 row)

データベーススキーマは Standalone Migrations で管理する。

gem のインストール、ユーザーの作成、データベースの作成、スキーマのロードをする。

$ bundle
$ bundle exec rake db:create_user
$ bundle exec rake db:create
$ bundle exec rake db:schema:load

Tips

binbundle exec をラップした rake コマンドがある。 ./binPATH の前の方に加えておけば、 bundle exec を省いて rake できる。

$ PATH=./bin:$PATH
$ which rake
./bin/rake

Server setup

motyhub-app に移動する。

$ cd motyhub-app

ビルドする。

$ stack build

起動する。

$ stack exec motyhub
running motyhub on port 8080...

Development

motyhub-app に移動する。

$ cd motyhub-app

Development server

ghcid を使ってオートリロードする。

$ ghcid --test="DevMain.reload"

Repl

Repl では src/Dev.hs をロードする。 Repl でよく使うモジュールは src/Dev.hs でインポートする。

$ stack ghci src/Dev.hs

motyhub's People

Contributors

kayhide avatar cdepillabout avatar

Watchers

MIKAMI Yoshiyuki avatar Takuya Miyamoto avatar James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.