LoginSignup
5
5

More than 5 years have passed since last update.

HerokuでCoffeescriptをコンパイルせずに実行

Last updated at Posted at 2013-01-29

herokuの使用はココ、nodeのバージョンで怒られたらココ、公開鍵(key)認証にハマったらココ

npmを使ってcoffee-scriptを入れる。

$ npm init
$ npm install coffee-script --save

又はpackage.jsonを直接してcoffee-scriptの依存宣告を追加。

package.json
{
  "name": "",
  "description": "",
  "author": "",
  "version": "0.0.1",
  "main": "app.coffee",
  "dependencies": {
    "coffee-script": "*"
  },
  "licenses": ""
}

メインはapp.coffeeだとProcfileにはこう記述します。

Procfile
web: coffee app.coffee

このままコミットしてherokuにデプロイ。

$ git commit -a -m "ready for coffee-script"
$ git push heroku master
5
5
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
5
5