0.2.4 • Published 5 years ago

now-static-bin v0.2.4

Weekly downloads
137
License
MIT
Repository
github
Last release
5 years ago

now-static-bin

This package provides a builder for Zeit's Now 2.0 offering that enables running arbitrary executables in the generated lambdas.

Usage

Your now.json "builds" section should look something like this:

Example

Note: don't forget to add "version": 2 in your now.json file to use Now 2.0 explicitly.

{
  "builds": [
    {
      "src": "*.exe",
      "use": "now-static-bin",
      "config": {
        "port": 4000
      }
    }
  ]
}

Other Examples

Make sure to check the examples folder in this repo for examples in different programming languages. Below is a table that details their implementation choices.

They are also deployed on every commit to master and the latest build lives in now-static-bin-examples.now.sh.

ExampleDemoDescription
OCamlhttps://now-static-bin-examples.now.sh/examples/bintry/main.exeAn OCaml static binary example server (no source available yet)
Rusthttps://now-static-bin-examples.now.sh/examples/rust/server.exeA Rust simple-server example
Reasonhttps://now-static-bin-examples.now.sh/examples/reason/main.exeA Reason Cohttp server example that outputs request information

Configuration Options

  • port: the port that the deployed server listens on. Defaults to 8080.
  • timeout: the timeout that the launcher waits for your server to start listening on the specified port. Defaults to 50ms.

Limitations

  • Currently only HTTP servers are supported.
  • The maxLambdaSize setting defaults to 25MB. You can override this (up to a limit of 50MB) in the builder config, e.g.:
{
  "builds": [
    {
      "src": "*.exe",
      "use": "now-static-bin",
      "config": {
        "port": 4000,
        "maxLambdaSize": "50mb"
        ^^^ NEW
      }
    }
  ]
}

Copyright and License

Copyright © 2018 António Nuno Monteiro.

Distributed under the MIT License (see LICENSE).

0.2.4

5 years ago

0.2.4-canary.1

5 years ago

0.2.4-canary.0

5 years ago

0.2.3

5 years ago

0.2.3-canary.4

5 years ago

0.2.3-canary.3

5 years ago

0.2.3-canary.2

5 years ago

0.2.3-canary.1

5 years ago

0.2.3-canary.0

5 years ago

0.2.2

5 years ago

0.2.2-canary.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.2.0-canary.12

5 years ago

0.2.0-canary.11

5 years ago

0.2.0-canary.10

5 years ago

0.2.0-canary.9

5 years ago

0.2.0-canary.8

5 years ago

0.2.0-canary.7

5 years ago

0.2.0-canary.6

5 years ago

0.2.0-canary.5

5 years ago

0.2.0-canary.4

5 years ago

0.2.0-canary.3

5 years ago

0.2.0-canary.2

5 years ago

0.2.0-canary.1

5 years ago

0.2.0-canary.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago