An open API service indexing awesome lists of open source software.

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

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}`