2023-04-11 22:45:19 +09:00
..
2023-02-11 12:38:46 +09:00
2022-05-18 00:04:37 +09:00
2022-05-18 00:04:37 +09:00
2022-05-18 00:04:37 +09:00
2022-05-18 00:04:37 +09:00
2023-04-11 22:45:19 +09:00
2023-02-11 12:38:46 +09:00
2022-05-18 00:04:37 +09:00

simple-json-server

  • A simple HTTP JSON server implemented in Go and compiled with tinygo.

Example

Request

curl --location --request POST 'https://simple-json-server.syumai.workers.dev/hello' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "syumai"
}'

Response

{
    "message": "Hello, syumai!"
}

Development

Requirements

This project requires these tools to be installed globally.

  • wrangler
  • tinygo
  • easyjson
    • go install github.com/mailru/easyjson/...@latest

Commands

make dev     # run dev server
make build   # build Go Wasm binary
make publish # publish worker