lifedebugger commited on
Commit
f04ece2
·
verified ·
1 Parent(s): 087b26d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -71
README.md CHANGED
@@ -1,71 +1,8 @@
1
- # Golang API Boilerplate
2
- This is a boilerplate for a RESTful API written in Golang.
3
-
4
- ## Features
5
- - [x] JWT Authentication
6
- - [x] PostgreSQL Database
7
- - [x] GORM ORM
8
- - [x] Gin Framework
9
- - [x] Docker Support
10
- - [x] Environment Variables
11
- - [x] Logging
12
- - [x] Error Handling
13
-
14
- ## Getting Started
15
- 1. Clone the repository
16
- 2. Run `go get` to download the dependencies
17
- 3. Create a file named `.env` and add the following variables:
18
- * `DB_HOST`
19
- * `DB_USER`
20
- * `DB_PASSWORD`
21
- * `DB_NAME`
22
- * `DB_PORT`
23
- * `SALT`
24
- * `HOST_ADDRESS`
25
- * `HOST_PORT`
26
- * `LOG_PATH`
27
- 4. Run `go run main.go` to start the server
28
- 5. Open your browser and navigate to `http://localhost:HOST_PORT`
29
-
30
- ## API Endpoints
31
- ### Authentication
32
- - `POST /login`: Login with email and password
33
- - `POST /register`: Register a new user
34
- - `GET /logout`: Logout
35
-
36
- ### Users
37
- - `GET /users`: Get all users
38
- - `GET /users/:id`: Get a user by ID
39
- - `PUT /users/:id`: Update a user
40
- - `DELETE /users/:id`: Delete a user
41
-
42
- ## Docker Support
43
- You can build a Docker image by running `docker build -t my-api .` and then run it with `docker run -p 8080:8080 my-api`.
44
-
45
- ## Environment Variables
46
- You can set the following environment variables:
47
- - `DB_HOST`
48
- - `DB_USER`
49
- - `DB_PASSWORD`
50
- - `DB_NAME`
51
- - `DB_PORT`
52
- - `SALT`
53
- - `HOST_ADDRESS`
54
- - `HOST_PORT`
55
- - `LOG_PATH`
56
-
57
- ## Logging
58
- The API uses the `log` package to log errors. You can set the `LOG_PATH` environment variable to specify the log file path.
59
-
60
- ## Error Handling
61
- The API uses the `errors` package to handle errors. You can set the `ERROR_PATH` environment variable to specify the error file path.
62
-
63
- # Command Documentation
64
-
65
- ## Update Golang Project version
66
- > go mod edit -go 1.24
67
- > go mod tidy
68
-
69
- ## Update all package
70
- > go get -u ./...
71
- > go mod tidy
 
1
+ ---
2
+ title: Quzuu Api Dev
3
+ emoji: 🐠
4
+ colorFrom: indigo
5
+ colorTo: gray
6
+ sdk: docker
7
+ pinned: false
8
+ ---