Skip to content

Instantly share code, notes, and snippets.

@nakaji-dayo
Created January 3, 2015 08:22
Show Gist options
  • Save nakaji-dayo/e74885b0deccfcc96e06 to your computer and use it in GitHub Desktop.
Save nakaji-dayo/e74885b0deccfcc96e06 to your computer and use it in GitHub Desktop.

Revisions

  1. nakaji-dayo created this gist Jan 3, 2015.
    6 changes: 6 additions & 0 deletions App.hs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    portS <- getEnv "PORT"
    let port = read portS
    runResourceT $ flip runSqlPool pool $ do
    runMigration migrateAll
    s <- static "static"
    warp port $ App s pool