UNPKG

lambdasync

Version:

Easy sync between local code and AWS lambda functions

67 lines (66 loc) 3.21 kB
<!DOCTYPE html> <html> <head> <script>/*Redirect with trailing slash so relative links work*/var l = window.location, p = l.pathname; if (p.substr(p.length - 1) !== '/') l.href = l.href + '/'</script> <title>AWS Serverless Express</title> <style> body { width: 600px; margin: auto; } .resources > h2 { margin-bottom: 0; } .resource > h3, .resource > p { display: inline-block; margin-bottom: 0.5rem; } .resource > code { display: block; background-color: #eff0f1; color: #393318; padding: 5px; font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif; white-space: nowrap; overflow-x: auto; } </style> </head> <body> <h1>AWS Serverless Express</h1> <p>Welcome to your AWS serverless Express application. This example application has several resources configured for you to explore. State is stored in memory in a given container, and thus ephemeral - see <a href="https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/" target="_blank">Understanding Container Reuse in AWS Lambda</a> for more information.</p> <section class="resources"> <h2>Resources</h2> <section class="resource"> <h3><a class="resource-example-link" href="users">GET /users</a></h3> <p>Returns a list of all users.</p> <code>curl <span class="api-base-url"></span>users</code> </section> <section class="resource"> <h3>POST /users</h3> <p>Creates a new user.</p> <code>curl <span class="api-base-url"></span>users -X POST -d '{"name":"Jake"}' --header 'content-type: application/json'</code> </section> <section class="resource"> <h3><a class="resource-example-link" href="users/1">GET /users/:userId</a></h3> <p>Returns a single user.</p> <code>curl <span class="api-base-url"></span>users/1</code> </section> <section class="resource"> <h3>PUT /users/:userId</h3> <p>Updates an existing user.</p> <code>curl <span class="api-base-url"></span>users/1 -X PUT -d '{"name":"Jane"}' --header 'content-type: application/json'</code> </section> <section class="resource"> <h3>DELETE /users/:userId</h3> <p>Deletes an existing user.</p> <code>curl <span class="api-base-url"></span>users/1 -X DELETE</code> </section> </section> <script> var baseUrl = window.location.href var baseUrlElements = document.getElementsByClassName('api-base-url') for(var i = 0; i < baseUrlElements.length; ++i) baseUrlElements[i].innerText = baseUrl </script> </body> </html>