This code accompanies articles on quobix.com. If you would like to gain full context behind this code and learn more about the tooling it uses, then check out the following articles.
- How to build a React based pub-sub client using WebSockets and JavaScript
- How to create an event-driven API via AsyncAPI using golang
- How to create a streaming AsyncAPI microservice using golang
git clone https://github.com/daveshanley/asyncapi-tutorials.git
- Change directory to the stock ticker example.
cd asyncapi-tutorials/stock-ticker
- Install all dependencies.
npm install
- Run the application.
npm start
- Open your browser and try it out!
http://localhost:3000
- Change directory to the streaming example.
cd asyncapi-tutorials/streaming
- Boot the server and service.
go run server/server.go
- Open a new terminal window and run the client and watch a stream of 10 random words appear, one every second
go run client.go
make sure you stop the server process before trying other examples.
- Change directory to the pub-sub example.
cd asyncapi-tutorials/pub-sub
- Boot the server and service.
go run server/server.go
- Open a new terminal window and run the client. Enjoy your terrible joke.
go run client.go