Skip to content

Latest commit

 

History

History
 
 

golang-api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Golang API

REST API example.

Deploy

$ up

Usage

$ curl -d Tobi https://example.com/
welcome to the family "Tobi"!

$ curl -d Loki https://example.com/
welcome to the family "Loki"!

$ curl -d Jane https://example.com/
welcome to the family "Jane"!

$ curl https://example.com/
- Tobi
- Jane
- Loki

Notes

There's no need to wrap pets in a mutex since Lambda processes only a single request per container concurrently.

Don't actually rely on local state like this, use a database. In-memory state is only useful for caching in a Lambda container.