brew install nodebrew
echo 'export PATH=$PATH:$HOME/.nodebrew/ current/bin' >> ~/.bash_profile
mkdir -p ~/.nodebrew/src
nodebrew install-binary v6.11.5
npm install -g serverless
mkdir eg-work && cd eg-work
wget https://raw.githubusercontent.com/serverless/event-gateway/master/install.sh
bash install.sh 0.5.15
https://github.com/serverless/event-gateway/releases (Windows)
./bin/event-gateway -dev
.\event-gateway.exe -dev
(Windows)
$ cat ~/.aws/credentials
[default]
aws_access_key_id = AKIAJ2ADWNEQBKZ76VOQ
aws_secret_access_key = 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
region = us-east-1
curl --request POST \
--url http://127.0.0.1:4001/v1/functions \
--header 'content-type: application/json' \
--data '{"functionId": "hello", "provider":{"type":"awslambda", "arn": "arn:aws:lambda:us-east-1:825880940331:function:sls-workshop-dev-postprocess", "region": "us-east-1"}}'
curl --request GET --url http://127.0.0.1:4001/v1/functions
curl --request POST \
--url http://127.0.0.1:4001/v1/subscriptions \
--header 'content-type: application/json' \
--data '{"functionId": "hello", "event":"awesomeEvent"}'
curl --request GET --url http://127.0.0.1:4001/v1/subscriptions
curl --request POST \
--url http://127.0.0.1:4000/ \
--header 'content-type: application/json' --header 'event: awesomeEvent' \
--data '{"userId": "123"}'
https://console.cloud.google.com
https://console.cloud.google.com/kubernetes/list
sudo npm install -g serverless
export RELEASE=v0.2.3
kubectl create ns kubeless
kubectl create -f https://github.com/kubeless/kubeless/releases/download/$RELEASE/kubeless-$RELEASE.yaml
set RELEASE=v0.2.3`
kubectl create ns kubeless
kubectl create -f https://github.com/kubeless/kubeless/releases/download/%RELEASE%/kubeless-%RELEASE%.yaml
kubectl get pods -n kubeless
git clone https://github.com/serverless/serverless-kubeless.git
cd serverless-kubeless/examples/get-python/ && npm install
serverless deploy
kubectl get function
serverless invoke -f hello -l
serverless logs -f hello
serverless remove
git clone https://github.com/serverless/event-gateway-example.git
cd event-gateway-example && npm install
https://cloud.google.com/bigquery/quickstart-web-ui
cd event-gateway-example/services/analytics/ && node setup.js
https://bigquery.cloud.google.com/welcome
sls login
cd event-gateway-example/services/analytics && sls run
curl --request POST --url http://localhost:4001/v1/subscriptions --header content-type: application/json --data '{"functionId": "analytics-analytics", "event": "http", "method": "POST", "path": "/users"}'
curl -XGET http://localhost:4001/v1/subscriptions | jq
cd event-gateway-example/frontend && npm start
SELECT
event,
receivedAt,
JSON_EXTRACT(data, '$.email') AS email, data
FROM [<your-project-id>:emit_demo.test_events]
ORDER BY receivedAt DESC LIMIT 1000