This article assumes that you have Crystal and Heroku CLI installed.

Create a sample application

Create a new application using

You should see the following on your terminal

now cd to the root of the app, $ cd sample-app  and add Kemal to shrad.yml file

and run $ crystal deps for installing dependencies.

Add a “/” route

Open file and add replace the contents with the following code

now run $ crystal src/  and go to http://localhost:3000on your browser. You should see ur app running and the message ‘Hello World’.

Deploy to Heroku

So far so good 🙂 Now let us deploy our app to Heroku. Run

$ heroku create your-custom-name --buildpack

You should see something like the following on your terminal.

You are all set. Commit and push to heroku

To see your app running go to . Congratulations you just deployed your crystal app to production

Happy Coding