https://github.com/yuhexiong/user-api-golang
https://github.com/yuhexiong/user-api-golang
api backend go golang mongodb restful-api
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuhexiong/user-api-golang
- Owner: yuhexiong
- Created: 2023-10-06T03:55:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T04:07:58.000Z (over 2 years ago)
- Last Synced: 2025-06-23T17:12:02.806Z (about 1 year ago)
- Topics: api, backend, go, golang, mongodb, restful-api
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# User API
## Overview
- Language: Golang v1.20.1
- Web Framework: Fiber
- DataBase: MongoDB v7.0.2
## ENV
copy .env.default and rename as .env
```
MONGO_URL=
DB_NAME=
API_PORT=
```
## Install Modules
```
go get -u && go mod tidy -v
```
## Run
```
go run main.go
```
## Test
```
go test -v ./test/.
```
## API
* `POST /user`
* `GET /user/{userId}`
* `PUT /user/{userId}`
* `PATCH /user/{userId}/{status}`
* `DELETE /user/{userId}`