Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.28 KB

05-runtimes.md

File metadata and controls

63 lines (41 loc) · 1.28 KB
title slug
Runtimes
runtimes

Up supports a number of interpreted languages, and virtually any language which can be compiled to a binary such as Golang. Up does its best to provide idiomatic and useful out-of-the-box experiences tailored to each language. Currently first-class support is provided for:

  • Golang
  • Node.js
  • Crystal
  • Static sites

Node.js

When a package.json file is detected, Node.js is the assumed runtime. By default nodejs10.x is used, see Lambda Settings for details.

The build hook becomes:

$ npm run build

The server run by the proxy becomes:

$ npm start

Golang

When a main.go file is detected, Golang is the assumed runtime.

The build hook becomes:

$ GOOS=linux GOARCH=amd64 go build -o server *.go

The clean hook becomes:

$ rm server

Crystal

When a main.cr file is detected, Crystal is the assumed runtime. Note that this runtime requires Docker to be installed.

The build hook becomes:

$ docker run --rm -v $(pwd):/src -w /src crystallang/crystal crystal build -o server main.cr --release --static

The clean hook becomes:

$ rm server

Static

When an index.html file is detected the project is assumed to be static.