Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
naeemaei committed Apr 25, 2024
1 parent c0d90cd commit a10779e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ go run main.go
##### Address: [http://localhost:5005](http://localhost:5005)

#### Stop
```
```bash
docker compose -f "docker/docker-compose.yml" down
```

#### Examples

##### Login
```
```bash
curl -X 'POST' \
'http://localhost:5005/api/v1/users/login-by-username' \
-H 'accept: application/json' \
Expand All @@ -74,7 +74,7 @@ curl -X 'POST' \

###### City filter and sort

```
```json
{
"filter": {
"Name": {
Expand All @@ -97,7 +97,7 @@ curl -X 'POST' \

###### City in range filter

```
```json
{
"filter": {
"Id": { // Column name
Expand All @@ -120,7 +120,7 @@ curl -X 'POST' \

### Run project with dependencies on Docker

```
```bash
docker compose -f "docker/docker-compose.yml" up -d --build
```

Expand Down Expand Up @@ -166,22 +166,22 @@ Password: admin

### Docker Stop

```
```bash
docker compose -f 'docker/docker-compose.yml' --project-name 'docker' down
```

### Linux

0. build Project and copy configuration

```
```bash
/src > go build -o ../prod/server ./cmd/main.go
/src > mkdir ../prod/config/ && cp config/config-production.yml ../prod/config/config-production.yml
```

1. Create systemd unit

```
```bash
sudo vi /lib/systemd/system/go-api.service
```

Expand All @@ -204,19 +204,19 @@ WantedBy=multi-user.target

3. Start service

```
```bash
sudo systemctl start go-api
```

4. Stop service

```
```bash
sudo systemctl stop go-api
```

5. Show service logs

```
```bash
sudo journalctl -u go-api -e
```

Expand Down

0 comments on commit a10779e

Please sign in to comment.