Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anmonteiro/now-static-bin
Run arbitrary executables in Now 2.0 Lambdas
https://github.com/anmonteiro/now-static-bin
aws-lambda builder now now-builder serverless zeit
Last synced: 2 months ago
JSON representation
Run arbitrary executables in Now 2.0 Lambdas
- Host: GitHub
- URL: https://github.com/anmonteiro/now-static-bin
- Owner: anmonteiro
- License: mit
- Created: 2018-11-10T15:15:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-29T20:07:25.000Z (over 1 year ago)
- Last Synced: 2024-05-22T21:31:09.221Z (8 months ago)
- Topics: aws-lambda, builder, now, now-builder, serverless, zeit
- Language: Go
- Homepage: https://now-static-bin-examples.now.sh
- Size: 19.4 MB
- Stars: 23
- Watchers: 4
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# now-static-bin
This package provides a
[builder](https://zeit.co/docs/v2/deployments/builders/overview#when-to-use-builders)
for Zeit's [Now 2.0](https://zeit.co/blog/now-2) 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.```json
{
"builds": [
{
"src": "*.exe",
"use": "now-static-bin",
"config": {
"port": 4000
}
}
]
}
```### Other Examples
Make sure to check the [`examples`](./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`](https://now-static-bin-examples.now.sh/).| Example | Demo | Description |
|:---------- |:---------|:----------------|
| [OCaml](/examples/bintry) | [https://now-static-bin-examples.now.sh/examples/bintry/main.exe](https://now-static-bin-examples.now.sh/examples/bintry/main.exe) | An OCaml static binary example server (no source available yet) |
| [Rust](/examples/rust) | [https://now-static-bin-examples.now.sh/examples/rust/server.exe](https://now-static-bin-examples.now.sh/examples/rust/server.exe) | A Rust [simple-server](https://github.com/steveklabnik/simple-server) example |
| [Reason](/examples/reason) | [https://now-static-bin-examples.now.sh/examples/reason/main.exe](https://now-static-bin-examples.now.sh/examples/reason/main.exe) | A [Reason](https://reasonml.github.io/) [Cohttp](https://github.com/mirage/ocaml-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.
## Copyright and License
Copyright © 2018 António Nuno Monteiro.
Distributed under the MIT License (see [LICENSE](./LICENSE)).