Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
31
node_modules/@vercel/go/main.go
generated
vendored
Normal file
31
node_modules/@vercel/go/main.go
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"syscall"
|
||||
|
||||
"__VC_HANDLER_PACKAGE_NAME"
|
||||
vc "github.com/vercel/go-bridge/go/bridge"
|
||||
)
|
||||
|
||||
func checkForLambdaWrapper() {
|
||||
wrapper := os.Getenv("AWS_LAMBDA_EXEC_WRAPPER")
|
||||
if wrapper == "" {
|
||||
return
|
||||
}
|
||||
|
||||
// Removing the env var doesn't work
|
||||
// Set it to empty string to override the previous value
|
||||
os.Setenv("AWS_LAMBDA_EXEC_WRAPPER", "")
|
||||
argv := append([]string{wrapper}, os.Args...)
|
||||
err := syscall.Exec(wrapper, argv, os.Environ())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
checkForLambdaWrapper()
|
||||
vc.Start(http.HandlerFunc(__VC_HANDLER_FUNC_NAME))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue