# API Development

- Page: https://shared.btbytes.com/p/api-development
- Date: 2023-10-02
- Tags: api

## Reading

[Everything I know about good API design](https://www.seangoedecke.com/good-api-design/) by [sean goedecke](https://www.seangoedecke.com/)

## Tools

The following should be considered as alternatives for Postman.

1. [bruno](https://www.usebruno.com/) -- open source API client similar to  Postman, Insomnia and similar tools. Bruno stores your collections directly in a folder on your filesystem. We use a plain text markup language, `Bru`, to save information about API requests.  You can use git or any version control of your choice to collaborate over your API collections.

2. [RapidAPI](https://paw.cloud) for Mac is a full-featured HTTP client that lets you test and describe the APIs you build or consume. It has a beautiful native macOS interface to compose requests, inspect server responses, generate client code and export API definitions.

---

[dreamhead/moco: Easy Setup Stub Server](https://github.com/dreamhead/moco)

- Write your own configuration file to describe your Moco server configuration as follow: `(foo.json)`

```json
[
  {
    "response" :
      {
        "text" : "Hello, Moco"
      }
  }
]
```

- Run [Moco](https://github.com/dreamhead/moco) HTTP server with the configuration file.

```shell
java -jar moco-runner-<version>-standalone.jar http -p 12306 -c foo.json
```

- Now, open your favorite browser to visit [http://localhost:12306](http://localhost:12306/) and you will see `"Hello, Moco"`.
