vic/heroku-buildpack-nim
{ "defaultBranch": "master", "description": "Deploy nim applications to heroku.", "fullName": "vic/heroku-buildpack-nim", "homepage": "", "language": "Shell", "name": "heroku-buildpack-nim", "pushedAt": "2022-07-11T08:40:20Z", "stargazersCount": 21, "updatedAt": "2024-05-29T18:39:47Z", "url": "https://github.com/vic/heroku-buildpack-nim"}Heroku Buildpack for Nim
Section titled “Heroku Buildpack for Nim”This is a Heroku-compatible buildpack for Nim apps. It uses Nimble for dependency management.
Currently supports Nim version 1.0 and upwards.
Example
Section titled “Example”$ tree.├── Procfile├── app.nimble└── src └── app.nim
$ heroku create --buildpack https://github.com/vic/heroku-buildpack-nim.gitCreating your-app-1234...
$ git push heroku master...Minimum .nimble file:
# Package
version = "0.1.0"author = "John Doe"description = "my next great API"license = "MIT"srcDir = "src"bin = @["app"]
# Dependencies
requires "nim >= 1.0.2", "jester >= 0.4.3"The buildpack expects you to include a .nimble file in order to download dependencies and build your app.
Be sure to set the bin value on your nimble file to the executable name for your app.
And create a Procfile with a process to run for your executable. Should be the same binary that you defined in the bin setting of your .nimble file:
web: ./appCreate an app using this buildpack
heroku create --buildpack https://github.com/vic/heroku-buildpack-nim.gitNim version
Section titled “Nim version”Since Nim’s master branch is deprecated, you have to define the branch of the Nim version that should be installed by this buildpack.
This buildpack was tested with Nim version 1.0:
heroku config:set NIM_BRANCH=version-1-0You can use the most recent development version this way:
heroku config:set NIM_BRANCH=develExample
Section titled “Example”An example nimble app lives here