Inspiration
We would like to build an API that provides funny quotes to people. We choose to use Blackbird since it allows us to build the API in the shortest amount of time possible while also producing a killer API!
What it does
The API provides funny quotes for people. We built the API using two different approaches: one is blackbirds operations of Ambassador and another is Gravitee
How we built it
We built the API by using different Blackbird operations and commands below and were able to save time since it took us 3 minutes for everything to be set up. Below is the list of all the commands we used to build the API:
- blackbird login
- blackbird api create "Humor API" --spec-path ./humorapi.yaml
- blackbird api list humor-api
- blackbird mock create humor-api --api-name humor-api
- blackbird mock list humor-api
- blackbird instance list humor-api
- curl https://default-blackbird-viclinhs-organization-46e57-0.blackbird-relay.a8r.io/humor-api/funnyquotes
- blackbird mock config humor-api set dynamic=false
- blackbird mock config humor-api get # to get the whole config
- blackbird mock config humor-api get dynamic
- blackbird code generate --template go --spec-path ./humorapi.yaml --output go-humor-api
- Enter value for variable ProjectName: humorie
- Enter value for variable GoModule: api
- Enter value for variable GoVersion: 1.22.0 enable GitHub Actions - Test module? [y/n]: y enable Readme module? [y/n]: y enable Dockerfile module? [y/n]: y
- go run cmd/go-humor-api/main.go
- blackbird code run humor-api --dockerfile Dockerfile --context . --local-port 80
- blackbird instance list humor-api
- blackbird code debug humor-api --dockerfile Dockerfile --context . --local-port 80
- blackbird deployment create humor-api --dockerfile Dockerfile --context .
- blackbird deployment status humor-api
- blackbird deployment status humor-api --logs
- blackbird logout
- We built the same API using Gravitee technology. It took us more than 30 minutes for the API to be set up and deployed. Gravitee: https://youtu.be/vG7-kIbFRRM
Challenges we ran into
We had challenges to learn the new technology and build the new API using blackbird of Ambassador and Gravitee
Accomplishments that we're proud of
We were able to build the new API with 22 blackbird commands in short amount of time. We were also able to build an APi using Gravitee
What we learned
We learn how to build API using blackbird commands and technology as well as Gravitee
What's next for Humorie
We would like to improve the API by using blackbird technology
Built With
- ambassador
- blackbird
- dockerfile
- go
- python
Log in or sign up for Devpost to join the conversation.