Note: This fork adds a link flag to a
libc folder on your project root in order to collect static c libs
You can create an app in Heroku with Crystal's buildpack by running the following command:
$ heroku create myapp --buildpack https://github.com/xosmond/heroku-buildpack-crystal.git
The default behaviour is to use the latest crystal release.
If you need to use a specific version create a
.crystal-version file in your
application root directory with the version that should be used (e.g.
In order for the buildpack to work properly you should have a
as it is how it will detect that your app is a Crystal app.
Your application has to listen on a port defined by Heroku. It is given to you
through the command line option
--port and the environment variable
ENV["PORT"] in Crystal). However, most web frameworks
should handle this for you.
To test a change to this buildpack, write a unit test in
tests/run that asserts your change and
make test to ensure the change works as intended and does not break backwards compatibility.
To learn more about how to deploy a Crystal application to Heroku, read our blog post.
If you have and older version of Crystal (
<= 0.9), that uses the old
Projectfile way of handling dependencies, please upgrade :-).
Copy the snippet above into CLI.