You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
This is a notification microservice.
4
4
5
5
## Features
6
-
- support apns and mipush notifications
6
+
- support apns and mipush notifications
7
7
- REST API to manage notification and user device tokens
8
8
9
9
## Usage
@@ -20,12 +20,22 @@ go build -o notification.exe
20
20
./notification.exe
21
21
```
22
22
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
+
23
33
### Test
24
34
Please export `MODE=test` and `BASE_PATH=$PWD`
25
35
to avoid relative path errors in unit tests.
26
36
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,
29
39
e.g. `APNS_DEVICE_TOKEN=1234567`
30
40
31
41
### API Docs
@@ -51,7 +61,7 @@ Please visit http://localhost:8000/docs after running app
51
61
52
62
Feel free to dive in! [Open an issue](https://github.com/OpenTreeHole/notification/issues/new) or [Submit PRs](https://github.com/OpenTreeHole/notification/compare).
53
63
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.
55
65
For the developing roadmap, please visit [this issue](https://github.com/OpenTreeHole/notification/issues/1).
0 commit comments