Coder Social home page Coder Social logo

heroku-buildpack-nim's Introduction

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

$ tree
.
├── Procfile
├── app.nimble
└── src
    └── app.nim

$ heroku create --buildpack https://github.com/vic/heroku-buildpack-nim.git
Creating 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"

Usage

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: ./app

Create an app using this buildpack

heroku create --buildpack https://github.com/vic/heroku-buildpack-nim.git

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-0

You can use the most recent development version this way:

heroku config:set NIM_BRANCH=devel

If you should need to get more specific than just referencing a branch, you can provide a commit SHA this way:

heroku config:set NIM_REV=dc3919bb1af89799e391b4c4ecd0f1f60f7862ff

Example

An example nimble app lives here

heroku-buildpack-nim's People

Contributors

awseward avatar vic avatar yglukhov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.