Skip to content

Commit 946b338

Browse files
committed
docs(readme): add run instructions and environment modes
- Added section on how to export MODE and BASE_PATH before running - Clarified available modes: production / dev / test / perf Signed-off-by: acture <acturea@gmail.com>
1 parent 66eea3a commit 946b338

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This is a notification microservice.
44

55
## Features
6-
- support apns and mipush notifications
6+
- support apns and mipush notifications
77
- REST API to manage notification and user device tokens
88

99
## Usage
@@ -20,12 +20,22 @@ go build -o notification.exe
2020
./notification.exe
2121
```
2222

23+
### Run
24+
Before running, export `MODE` and `BASE_PATH`:
25+
26+
```bash
27+
export BASE_PATH=$PWD
28+
# Available modes: production / dev / test / perf
29+
export MODE=dev
30+
go run main.go
31+
```
32+
2333
### Test
2434
Please export `MODE=test` and `BASE_PATH=$PWD`
2535
to avoid relative path errors in unit tests.
2636

27-
Device tokens must be set to test push notifications,
28-
export `${service}_DEVICE_TOKEN` for each push service,
37+
Device tokens must be set to test push notifications,
38+
export `${service}_DEVICE_TOKEN` for each push service,
2939
e.g. `APNS_DEVICE_TOKEN=1234567`
3040

3141
### API Docs
@@ -51,7 +61,7 @@ Please visit http://localhost:8000/docs after running app
5161

5262
Feel free to dive in! [Open an issue](https://github.com/OpenTreeHole/notification/issues/new) or [Submit PRs](https://github.com/OpenTreeHole/notification/compare).
5363

54-
We are now in rapid development, any contribution would be of great help.
64+
We are now in rapid development, any contribution would be of great help.
5565
For the developing roadmap, please visit [this issue](https://github.com/OpenTreeHole/notification/issues/1).
5666

5767
### Contributors

0 commit comments

Comments
 (0)