github.com/skabbes/up@v0.2.1/docs/runtimes.md (about)

     1  ---
     2  title: Runtimes
     3  ---
     4  
     5  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:
     6  
     7  - Python
     8  - Golang
     9  - Node.js
    10  - Crystal
    11  - Static sites
    12  
    13  ## Node.js
    14  
    15  When a `package.json` file is detected, Node.js is the assumed runtime. By default the latest version supported by Lambda is used (6.10). If you'd like to deploy other versions of Node you may want to consider using the [Node binaries](https://github.com/apex/up-examples/tree/master/oss/node-8).
    16  
    17  The `build` hook becomes:
    18  
    19  ```
    20  $ npm run build
    21  ```
    22  
    23  The server run by the proxy becomes:
    24  
    25  ```
    26  $ npm start
    27  ```
    28  
    29  ## Python
    30  
    31  When requirements.txt is present the build command becomes:
    32  
    33  ```
    34  $ mkdir -p .pypath/ && pip install -r requirements.txt -t .pypath/
    35  ```
    36  
    37  The server run by the proxy becomes:
    38  
    39  ```
    40  $ python app.py
    41  ```
    42  
    43  ## Golang
    44  
    45  When a `main.go` file is detected, Golang is the assumed runtime.
    46  
    47  The `build` hook becomes:
    48  
    49  ```
    50  $ GOOS=linux GOARCH=amd64 go build -o server *.go
    51  ```
    52  
    53  The `clean` hook becomes:
    54  
    55  ```
    56  $ rm server
    57  ```
    58  
    59  ## Crystal
    60  
    61  When a `main.cr` file is detected, Crystal is the assumed runtime. Note that this runtime requires Docker to be installed.
    62  
    63  The `build` hook becomes:
    64  
    65  ```
    66  $ docker run --rm -v $(PWD):/src -w /src tjholowaychuk/up-crystal crystal build --link-flags -static -o server main.cr
    67  ```
    68  
    69  The `clean` hook becomes:
    70  
    71  ```
    72  $ rm server
    73  ```
    74  
    75  ## Static
    76  
    77  When an `index.html` file is detected the project is assumed to be static.