Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,21 @@ func main() {
**Running the application:**

1. Save the code above as `main.go`
2. Run the application:
2. Initialize a Go module and download dependencies:

```sh
go mod init example.com/gin-quickstart
go mod tidy
```

3. Run the application:

```sh
go run main.go
```

3. Open your browser and visit [`http://localhost:8080/ping`](http://localhost:8080/ping)
4. You should see: `{"message":"pong"}`
4. Open your browser and visit [`http://localhost:8080/ping`](http://localhost:8080/ping)
5. You should see: `{"message":"pong"}`

**What this example demonstrates:**

Expand Down