LoginSignup
1
0

More than 5 years have passed since last update.

Yesod + Postgresで、stack exec -- yesod develができるところまで

Last updated at Posted at 2017-01-23

Yesod + Postgresで、stack exec -- yesod develができるところまで

はじめに

この記事はYesodでpostgreSQLを使う Haskell stackを参考にしました。参考にした記事をこえる内容はありません。自分用のまとめです。

前提

システムにStackやPostgreSQLはインストールずみであるとします。事前にYesod + sqliteでのテストをしてあるものとします。また、PostgreSQLは起動ずみとします。

Yesodのプロジェクトの名前

ここではYesodのプロジェクトの名前をtestYesodとします。

必要なユーザの作成

% psql -U postgres -d postgres
# create user "testYesod" password 'testYesod';
# create user "testYesod_LOWER" password 'testYesod';

必要なデータベースの作成

# create database "testYesod_LOWER" owner "testYesod";
# create database "testYesod_LOWER_test" owner "testYesod";
# \q

Yesodのプロジェクトの作成とテスト

# stack new testYesod yesod-postgres && cd testYesod
# stack build
# stack exec -- yesod devel

これで、http://localhost:3000にアクセスするとデフォルトのYesodのページを見ることができる。

# stack test
...
10 examples, 0 failures
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0