PaaSであるHerokuには、Bulidpackという任意のコマンドをデプロイ時に実行できる仕組みがあります。 これを使って、OCamlで作ったWebアプリケーションをHeroku上で動作させる方法について紹介します。 てっとりばやく動かしたい人は、 heroku-buildpack-ocaml/sample-ocamlnet を見てもらうのが早いと思います。 前提 Herokuのアカウントをもっている OCamlを動かす環境が揃っている Heroku toolbeltがインストールされている Hello,worldを動かしてみる まずは、標準ライブラリだけを使って、Webサーバを作ってみます。 とりあえずディレクトリの準備 適当なディレクトリを作ります。 $ mkdir hello $ cd hello buildpackを指定して、herokuにレポジトリを作成します。 $ hero