All Projects → MartinNowak → heroku-buildpack-d

MartinNowak / heroku-buildpack-d

Licence: MIT license
Heroku Buildpack for the D Programming Language

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to heroku-buildpack-d

heroku-buildpack-cli
No description or website provided.
Stars: ✭ 38 (+192.31%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Elm
Heroku buildpack for deploying Elm apps (NEEDS MAINTAINER)
Stars: ✭ 39 (+200%)
Mutual labels:  heroku-buildpack
Subdir Heroku Buildpack
Allows to use subdirectory configured via environment variable as a project root
Stars: ✭ 211 (+1523.08%)
Mutual labels:  heroku-buildpack
Create React App Buildpack
⚛️ Heroku Buildpack for create-react-app: static hosting for React.js web apps
Stars: ✭ 3,161 (+24215.38%)
Mutual labels:  heroku-buildpack
Slugrunner
Buildpack application runner for Deis Workflow.
Stars: ✭ 14 (+7.69%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Nodejs
The official Heroku buildpack for Node.js apps.
Stars: ✭ 1,146 (+8715.38%)
Mutual labels:  heroku-buildpack
heroku-buildpack-deno
Heroku Buildpack for Deno
Stars: ✭ 72 (+453.85%)
Mutual labels:  heroku-buildpack
heroku-buildpack-graphviz
Install Graphviz on Heroku
Stars: ✭ 18 (+38.46%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Jvm Common
Official Heroku buildpack for OpenJDK. It only installs the JDK and does not build an application. It is used by the Java, Scala, and Clojure buildpacks.
Stars: ✭ 34 (+161.54%)
Mutual labels:  heroku-buildpack
Reddit Bot
🤖 Making a Reddit Bot using Python, Heroku and Heroku Postgres.
Stars: ✭ 99 (+661.54%)
Mutual labels:  heroku-buildpack
Dotnetcore Buildpack
Heroku .NET Core Buildpack
Stars: ✭ 416 (+3100%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Python
The official Heroku buildpack for Python apps.
Stars: ✭ 849 (+6430.77%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Hugo
Heroku buildpack for Hugo, the static site generator - https://github.com/spf13/hugo
Stars: ✭ 79 (+507.69%)
Mutual labels:  heroku-buildpack
Heroku Buildpack R
Heroku buildpack for R - Makes deploying R on Heroku easy
Stars: ✭ 258 (+1884.62%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Google Chrome
Run (headless) Google Chrome on Heroku
Stars: ✭ 215 (+1553.85%)
Mutual labels:  heroku-buildpack
heroku-buildpack-nim
Deploy nim applications to heroku.
Stars: ✭ 20 (+53.85%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Datadog
Heroku Buildpack to run Datadog DogStatsD in a Dyno
Stars: ✭ 55 (+323.08%)
Mutual labels:  heroku-buildpack
heroku-binary-buildpack
Heroku buildpack to execute binaries.
Stars: ✭ 29 (+123.08%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Phoenix Static
A Heroku buildpack for building Phoenix's static assets
Stars: ✭ 225 (+1630.77%)
Mutual labels:  heroku-buildpack
Heroku Pinger
😴 Keep your free Heroku dynos awake
Stars: ✭ 84 (+546.15%)
Mutual labels:  heroku-buildpack

Heroku Buildpack: D

A heroku buildpack for the D programing language using dub to build applications.

Quickstart

Pablo De Napoli has written a boilerplate repo with a simple Deploy to Heroku button.

Usage

Example usage:

$ ls
dub.sdl source .d-compiler

$ heroku create --buildpack http://github.com/MartinNowak/heroku-buildpack-d.git

$ git push heroku master
...
-----> Heroku receiving push
-----> Fetching custom git buildpack... done
-----> D app detected
-----> Using dmd-2.078.0
-----> Building application with dub

Usage with Vibe.d

The buildpack will infer a default Procfile for you, that should be sufficient for many cases.

default_process_types:
  web: ./your-app-name --port $PORT

Use readOption or std.getopt to bind your HTTP server to the port choosen by Heroku. Here is dub's vibe.d template (dub init myapp --type=vibe.d) modified accordingly.

import vibe.vibe;

void main()
{
    auto settings = new HTTPServerSettings;
    settings.port = 8080;
    // <!-- NEW NEW NEW
    // listen on external interface by default
    settings.bindAddresses = ["0.0.0.0"];
    // read port from command line
    readOption("port|p", &settings.port, "Sets the port used for serving HTTP.");
    // optionally read bind address from command line
    readOption("bind-address|bind", &settings.bindAddresses[0], "Sets the address used for serving HTTP.");
    // NEW NEW NEW -->

    auto listener = listenHTTP(settings, &hello);
    runApplication();
}

void hello(HTTPServerRequest req, HTTPServerResponse res)
{
    res.writeBody("Hello, World!");
}

You can add a custom Procfile to your repo if you need more or different arguments.

web: ./your-app-name --port $PORT -v --my-arg

And finally see Deploy on Heroku - Dlang Tour for more details.

Selecting a D compiler

By default the latest dmd compiler is used. It is also possible to use gdc or ldc and to choose a specific compiler versions by adding a .d-compiler file to your project or by setting the DC environment variable in Heroku. Use dmd, ldc, or gdc to select the latest or dmd-2.068.2, ldc-0.16.0, or gdc-4.9.2 to select a specific version of a compiler.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].