Skip to content

y2kappa/llambda-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netlify lambda template (+ local testing)

Deploy a lambda to netlify and also test it locally with hyper, no docker necessary.

Run locally

$ cargo build
$ ./target/debug/server

Build on Mac for linux

You don't need to do it, netlify will do it for you, but you can test, if you want to.

$ rustup target add x86_64-unknown-linux-musl
$ brew install FiloSottile/musl-cross/musl-cross
$ cat ~/.cargo/config
[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"

References:

To build on netlify

cat rust-toolchain
[toolchain]
channel = "stable"
components = ["rustfmt", "clippy"]
targets = ["x86_64-unknown-linux-musl"]

References:

About

Netlify function with local server example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published