Example on how to run locally an AWS Lambda via API Gateway using localstack.
Based on...
Example on how to run locally an AWS Lambda via API Gateway using localstack.
Based on...
| #include <stdio.h> | |
| int sumadigitos(int cifra){ | |
| int suma =0; | |
| int fin =1; | |
| int divisor = 10; | |
| int digito; | |
| do{ | |
| digito = cifra%divisor; // leemos el ultimo digito | |
| suma = suma + digito; // acumulamos suma |
| var dgram = require('dgram'); // dgram is UDP | |
| // Listen for responses | |
| function listen(port) { | |
| var server = dgram.createSocket("udp4"); | |
| server.on("message", function (msg, rinfo) { | |
| console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port); | |
| }); |
| import socket | |
| import struct | |
| import sys | |
| from httplib import HTTPResponse | |
| from BaseHTTPServer import BaseHTTPRequestHandler | |
| from StringIO import StringIO | |
| import gtk | |
| import gobject |
| # Copyright 2014 Dan Krause | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |