You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Listed in [CNCF Landscape](https://landscape.cncf.io/?selected=go-fr).
22
+
<h2align="center">Listed in the <ahref="https://landscape.cncf.io/?selected=go-fr">CNCF Landscape</a></h2>
23
+
24
+
## 🎯 **Goal**
25
+
GoFr is designed to **simplify microservice development**, with key focuses on **Kubernetes deployment** and **out-of-the-box observability**. While capable of building generic applications, **microservices** remain at its core.
18
26
19
-
## 🎯 Goal
20
-
Even though generic applications can be written using GoFr, our main focus is to simplify the development of microservices.
21
-
We will focus on deployment in Kubernetes and aspire to provide out-of-the-box observability.
5. Inbuilt [Auth Middleware](https://gofr.dev/docs/advanced-guide/http-authentication) & Support for [Custom Middleware](https://gofr.dev/docs/advanced-guide/middlewares)
7.[HTTP service](https://gofr.dev/docs/advanced-guide/http-communication) with support for [Circuit Breaker](https://gofr.dev/docs/advanced-guide/circuit-breaker)
GoFr requires [Go](https://go.dev/) version [1.21](https://go.dev/doc/devel/release#go1.21.0) or above.
49
+
## 🚀 **Getting Started**
46
50
47
-
### Getting GoFr
48
-
With [Go's module support](https://go.dev/wiki/Modules#how-to-use-modules), `go [build|run|test]` automatically fetches the necessary dependencies when you add the import in your code:
51
+
### **Prerequisites**
52
+
- GoFr requires **[Go](https://go.dev/)** version **[1.21](https://go.dev/doc/devel/release#go1.21.0)** or above.
49
53
50
-
```sh
54
+
### **Installation**
55
+
To get started with GoFr, add the following import to your code and use Go’s module support to automatically fetch dependencies:
56
+
57
+
```go
51
58
import"gofr.dev/pkg/gofr"
52
59
```
53
60
54
-
Alternatively, use `go get`:
61
+
Alternatively, use the command:
55
62
56
-
```sh
63
+
```bash
57
64
go get -u gofr.dev/pkg/gofr
58
65
```
59
-
### Running GoFr
60
-
A basic example:
66
+
67
+
---
68
+
69
+
## 🏃 **Running GoFr**
70
+
71
+
Here's a simple example to get a GoFr application up and running:
Then visit [`localhost:8000/greet`](http://localhost:8000/greet) in your browser to see the response!
95
+
Visit [`localhost:8000/greet`](http://localhost:8000/greet) to see the result.
96
+
97
+
---
98
+
99
+
## 📂 **More Examples**
100
+
101
+
Explore a variety of ready-to-run examples in the [GoFr examples directory](https://github.com/gofr-dev/gofr/tree/development/examples).
102
+
103
+
---
104
+
105
+
## 👩💻 **Documentation**
106
+
107
+
-**[GoDoc](https://pkg.go.dev/gofr.dev)**: Official API documentation.
108
+
-**[GoFr Documentation](https://gofr.dev/docs)**: Comprehensive guides and resources.
109
+
110
+
---
85
111
86
-
### See more examples
87
-
A number of ready-to-run examples demonstrating various use cases of GoFr are available in the [GoFr examples](https://github.com/gofr-dev/gofr/tree/development/examples) directory.
112
+
## 👍 **Contribute**
88
113
89
-
## 👩💻Documentation
90
-
See the [godocs](https://pkg.go.dev/gofr.dev).
114
+
Help us make GoFr even better:
91
115
92
-
The documentation is also available on [gofr.dev](https://gofr.dev/docs).
116
+
1.**Star** this repo on GitHub! 🌟
117
+
2. Write a review or tutorial on **[Medium](https://medium.com/)**, **[Dev.to](https://dev.to/)**, or your blog.
118
+
3. Review the **[CONTRIBUTING.md](CONTRIBUTING.md)** guide to learn how to contribute to the project.
93
119
94
-
## 👍 Contribute
95
-
If you want to say thank you and/or support the active development of GoFr:
120
+
---
96
121
97
-
1.[Star](https://docs.github.com/en/get-started/exploring-projects-on-github/saving-repositories-with-stars) the repo.
98
-
2. Write a review or tutorial on [Medium](https://medium.com/), [Dev.to](https://dev.to/) or personal blog.
99
-
3. Visit [CONTRIBUTING](CONTRIBUTING.md) for details on submitting patches and the contribution workflow.
122
+
### 🎁 **Get a GoFr T-Shirt & Stickers!**
100
123
101
-
If your PR is merged or you have written an article or contributed in someway to development or spreading the word about GoFr, fill the [Google Form](https://forms.gle/R1Yz7ZzY3U5WWTgy5), and we will send you a <b>GoFr T-Shirt and Stickers</b> as a token of appreciation.
124
+
If your PR is merged, or if you contribute by writing articles or promoting GoFr, we invite you to fill out [this form](https://forms.gle/R1Yz7ZzY3U5WWTgy5) to claim your GoFr merchandise as a token of our appreciation!
Copy file name to clipboardExpand all lines: docs/quick-start/connecting-redis/page.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,14 @@ Optionally, you can use Docker to set up a development environment as described
12
12
docker run --name gofr-redis -p 6379:6379 -d redis
13
13
```
14
14
15
+
You can also set up a development environment with password authentication as described below.
16
+
17
+
```bash
18
+
docker run --name gofr-redis -p 2002:6379 -d \
19
+
-e REDIS_PASSWORD=password \
20
+
redis:7.0.5 --requirepass password
21
+
```
22
+
15
23
You can set a sample key `greeting` using the following command:
16
24
17
25
```bash
@@ -27,13 +35,15 @@ Following configuration keys are required for Redis connectivity:
27
35
28
36
*`REDIS_HOST`: It specifies the hostname or IP address of your Redis server.
29
37
*`REDIS_PORT`: It specifies the port number on which your Redis server is listening. The default Redis port is 6379.
30
-
38
+
*`REDIS_USER` : This is the user you'll use to connect to your Redis server. You can configure multiple users with different permissions in a single Redis container. For more details, refer to the [official docs](https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/)
39
+
*`REDIS_PASSWORD`: The password is required only if your Redis server is configured for authentication; if authentication is not enabled, no password is necessary.
31
40
```dotenv
32
41
APP_NAME=test-service
33
42
HTTP_PORT=9000
34
43
35
44
REDIS_HOST=localhost
36
45
REDIS_PORT=6379
46
+
REDIS_PASSWORD=password
37
47
```
38
48
39
49
The following code snippet demonstrates how to retrieve data from a Redis key named "greeting":
0 commit comments