Skip to content

Commit

Permalink
restful-go: fix spelling mistakes
Browse files Browse the repository at this point in the history
Signed-off-by: Soypete <[email protected]>
  • Loading branch information
Soypete authored and Soypete committed Sep 11, 2023
1 parent 230d001 commit 3ef246e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions restful-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

These are the code-samples, exercises, quizzes, and links needed for this course. To complete these exercises follow the instructions in this doc. In the subdirectories of this section are example solutions. Your soluutions do not need to match the provided solutions. The goal of the exercises is to learn and understand the why things are implemented so that a participant apply principles to any framework or problem set.

## Exercices
## Exercises

### [Exercise 1](/ex-1-servers/server.go) Build a Standard Library Server

In a main function, create a webserver using the `ListenAndServe()` function. This server should have at least one endpoint that accepts a parameter and returns it in a response. An example of a finished exercise in in [ex-1-server](ex-1-servers/server.go)

- reference: [go-by-example Https server](https://gobyexample.com/http-servers)

_ *NOTE*: `ListenAndServe()` is great for prototyping and non-production development. When you are building out your services, make sure you have security in mind. Use a custom `mux`. We will learn more aabout security best practices later on in the course. Check out [Reliable Webservices](../reliable-webservice-go/README.md).

## [Exercise 2](/ex-2-web-frameworks/framework.go) Build a Server Using an opensource Framework

The [Standard Library](https://pkg.go.dev/net/http) provides all the functionality needed to build a robust web server, but sometimes, instead of building out your own infrastructre, there is a benefit to adopting an opensource frameworks at the backbone of your server infrastructure. This exercise is you chance to experiment with some popular Go web frameworks.
Expand All @@ -23,11 +25,11 @@ Here are some examples of opensource frameworks:
- [Gin](https://github.com/gin-gonic/gin) <!-- uses it own context that predates context.Context-->
- [Fiber](https://github.com/gofiber/fiber) <!-- uses fasthhtp -->

## [Exercise 3](/ex-3-clients/client.go) Build a Go app that calls your new endpoint.
### [Exercise 3](/ex-3-clients/client.go) Build a Go app that calls your new endpoint.

Using the standard library to create a client that calls your new web endpoint. To connect to you server, you will need to run your server in one different and the client app in a different terminal window.

## [Exercise 4](/ex-4-test/framework_tests.go)
### [Exercise 4](/ex-4-test/framework_tests.go)

Using the [httptest](https://pkg.go.dev/net/http/httptest#example-ResponseRecorder) package add some tests for at least one of our newly created endpoints. You should have one test that checks for a 200s class error and one that tests for a 400s class error. Add additional test validations as time allows.

Expand Down

0 comments on commit 3ef246e

Please sign in to comment.