Skip to content

Commit a10779e

Browse files
committed
Update readme
1 parent c0d90cd commit a10779e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Readme.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ go run main.go
5252
##### Address: [http://localhost:5005](http://localhost:5005)
5353

5454
#### Stop
55-
```
55+
```bash
5656
docker compose -f "docker/docker-compose.yml" down
5757
```
5858

5959
#### Examples
6060

6161
##### Login
62-
```
62+
```bash
6363
curl -X 'POST' \
6464
'http://localhost:5005/api/v1/users/login-by-username' \
6565
-H 'accept: application/json' \
@@ -74,7 +74,7 @@ curl -X 'POST' \
7474

7575
###### City filter and sort
7676

77-
```
77+
```json
7878
{
7979
"filter": {
8080
"Name": {
@@ -97,7 +97,7 @@ curl -X 'POST' \
9797

9898
###### City in range filter
9999

100-
```
100+
```json
101101
{
102102
"filter": {
103103
"Id": { // Column name
@@ -120,7 +120,7 @@ curl -X 'POST' \
120120

121121
### Run project with dependencies on Docker
122122

123-
```
123+
```bash
124124
docker compose -f "docker/docker-compose.yml" up -d --build
125125
```
126126

@@ -166,22 +166,22 @@ Password: admin
166166

167167
### Docker Stop
168168

169-
```
169+
```bash
170170
docker compose -f 'docker/docker-compose.yml' --project-name 'docker' down
171171
```
172172

173173
### Linux
174174

175175
0. build Project and copy configuration
176176

177-
```
177+
```bash
178178
/src > go build -o ../prod/server ./cmd/main.go
179179
/src > mkdir ../prod/config/ && cp config/config-production.yml ../prod/config/config-production.yml
180180
```
181181

182182
1. Create systemd unit
183183

184-
```
184+
```bash
185185
sudo vi /lib/systemd/system/go-api.service
186186
```
187187

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

205205
3. Start service
206206

207-
```
207+
```bash
208208
sudo systemctl start go-api
209209
```
210210

211211
4. Stop service
212212

213-
```
213+
```bash
214214
sudo systemctl stop go-api
215215
```
216216

217217
5. Show service logs
218218

219-
```
219+
```bash
220220
sudo journalctl -u go-api -e
221221
```
222222

0 commit comments

Comments
 (0)