1
1
# RUST API SERVER
2
2
3
+ ![ Logo] ( ./logo.png )
4
+
5
+ [ ![ License] ( https://img.shields.io/github/license/sonntuet1997/rust-web-api-microservice-template )] ( https://github.com/sonntuet1997/rust-web-api-microservice-template/blob/master/LICENSE )
6
+ [ ![ Continuous Integration] ( https://github.com/sonntuet1997/rust-web-api-microservice-template/actions/workflows/ci.yaml/badge.svg )] ( https://github.com/sonntuet1997/rust-web-api-microservice-template/actions/workflows/ci.yaml )
7
+
3
8
## Introduction
4
9
5
10
Welcome to the Rust API Server! This server provides a simple REST interface for your applications. This README will
@@ -35,14 +40,14 @@ Options:
35
40
- Multiple config locations
36
41
37
42
``` shell
38
- ./cli -c ./config/* -c deploy/local/custom.toml
43
+ ./cli -c ./config/* .toml -c deploy/local/custom.toml
39
44
```
40
45
41
46
- Pipe the output with [ bunyan] ( https://github.com/trentm/node-bunyan )
42
47
43
48
``` shell
44
49
cargo install bunyan
45
- ./cli -c ./config/* -c deploy/local/custom.toml | bunyan
50
+ ./cli -c ./config/* .toml -c deploy/local/custom.toml | bunyan
46
51
```
47
52
48
53
## Configuration
@@ -51,6 +56,8 @@ cargo install bunyan
51
56
52
57
Configuration is applied in the following order: config files -> environment variables -> command-line arguments.
53
58
59
+ If you use ` -c *.toml ` to load config files, please be mindful of the order in which the files are applied.
60
+
54
61
### Environment Variable Examples
55
62
56
63
The server can be configured using environment variables. Below is a table outlining the available configuration
@@ -73,11 +80,11 @@ Make sure to set these environment variables according to your needs before runn
73
80
## GitHub Flow CI Configuration
74
81
75
82
1 . ** Set Docker Hub Secrets:**
76
- - Go to repository Settings > Secrets.
77
- - Add ` DOCKER_USERNAME ` and ` DOCKERHUB_TOKEN ` .
83
+ - Go to repository Settings > Secrets.
84
+ - Add ` DOCKER_USERNAME ` and ` DOCKERHUB_TOKEN ` .
78
85
79
86
2 . ** Enable Dependabot Alerts:**
80
- - In repository Insights, enable "Dependabot alerts" and "Security & Analysis."
87
+ - In repository Insights, enable "Dependabot alerts" and "Security & Analysis."
81
88
82
89
## Checklist
83
90
@@ -116,7 +123,8 @@ Demonstrate proficiency in advanced development practices including:
116
123
8 . [ ] Comprehensive DB query filter for list().
117
124
9 . [ ] Optimize release binary performance.
118
125
10 . [ ] Docs on how to use this repo, the design behind the scene.
119
- Feel free to explore and expand upon these functionalities as needed for your project. Happy coding!
126
+
127
+ Feel free to explore and expand upon these functionalities as needed for your project. Happy coding!
120
128
121
129
## Load Testing and Profiling
122
130
0 commit comments