Node 8 in AWS Lambda by Apex Up

This repo contains a Docker image and instructions to run a node 8 app version in AWS Lambda with Apex Up

Node.js 其它杂项

访问GitHub主页

共22Star

详细介绍

Node 8 in AWS Lambda by Apex Up

Important note!

The way this project is packaging the Node 8 app isn't the best. Try the official example of Apex Up that uses the Node binary! https://github.com/apex/up-examples/tree/master/oss/node-8.

Thanks!

Steps

  1. Clone this repo:

git clone https://github.com/romuloalves/up-node8.git

  1. Build the docker image with the Dockerfile:

docker build -t up-node8 .

  1. Build your code using the container image and the zeit/pkg inside it. Example:

docker run --rm -w /tmp -v $(PWD):/tmp up-node8 pkg --output=build/server --targets node8-linux .

Instead of clone this repository to build the image, you can use the image I built: romuloaalves/up-node8

docker run --rm -w /tmp -v $(PWD):/tmp romuloaalves/up-node8 pkg --output=build/server --targets node8-linux .

  1. Now is just deploy the content of the directory build using up(1)!

Example

There is an example you can run.

The instructions are inside the example dir.

License

MIT License

Copyright (c) 2017 Rômulo Alves

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.