https://github.com/v1tbrah/crud-api
https://github.com/v1tbrah/crud-api
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/v1tbrah/crud-api
- Owner: v1tbrah
- Created: 2022-11-19T20:42:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-19T21:43:12.000Z (over 2 years ago)
- Last Synced: 2025-02-07T13:31:56.032Z (4 months ago)
- Language: Go
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# crud-api
## Installation
`git clone https://github.com/v1tbrah/crud-api`
## Example usage
* Go to project working directory. For example: `cd ~/go/src/crud-api`
* Run app. For example: `go run cmd/main.go`## Options
The following options are set by default:
```
api server run address: `:3333`
storage type: `file`
(currently only `file` is supported)
path to file storage: `users.json`
```
* flag options:
```
-a string
api server run address
-st string
type of data storage
-pf string
path to file data storage
```
For example: `go run cmd/main.go -a=:8081 -st=file -pf=users.json`
* env options:
```
RUN_ADDRESS string
api server run address
STORAGE_TYPE string
type of data storage
-PATH_FILE_STORAGE string
path to file data storage
```