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
A meta service, Topcoder Bus API server provides information about other services offered by Topcoder.
6
+
7
+
This server was generated initially by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. We then copied over changes that existed in the older version over to version 5
The other configurations can be changed in `config/default.js` or by setting environment variables.
75
79
@@ -84,123 +88,23 @@ The other configurations can be changed in `config/default.js` or by setting env
84
88
-`TC_EMAIL_TOKEN` the email service authentication token (see tc-email README for details **link should be added later**)
85
89
-`TC_EMAIL_CACHE_PERIOD` the period to cache template placeholders from email service (60 min default)
86
90
87
-
## Code Standard
88
-
The code follows StandardJS:
89
-
90
-
```bash
91
-
npm install
92
-
npm run lint
93
-
```
94
-
95
-
## Generate JWT Tokens:
96
-
To generate JWT Tokens for allowed services, run:
97
-
98
-
```bash
99
-
npm run generate-tokens
100
-
```
101
-
102
-
## Local Deployment and Verification
103
-
104
-
- Start
105
-
106
-
```
107
-
npm run start
108
-
```
109
-
110
-
- Import `docs/tc-bus-api-server.postman_collection.json` and `docs/tc-bus-api-server.postman_environment.json` to Postman
111
-
- Change `URL` environment variable in Postman according to your deployment. If you deploy locally, it should be `http://localhost:3000/api/v1` by default
112
-
- Change `VALID_TOKEN` if you want to test with another JWT token
113
-
- Change `VALID_MESSAGE_TYPE` if you want to test with another message type
114
-
- Change `EMAIL` to a valid e-mail address
115
-
- Execute calls to verify the endpoints
116
-
117
-
118
-
### Verify the messsages end up in Kafka queue
119
-
Check `bus-api-test/README.md` to run a consumer that consumes and prints all messages in Kafka queue.
120
-
121
-
## Heroku Deployment and Verification
122
-
123
-
- Login and create a new app
124
-
```bash
125
-
heroku login
126
-
heroku create
127
-
```
91
+
## Deploying the server
128
92
129
-
- Set Kafka configurations (and other configurations if necessary)
- The app will be available at `https://<your app name>.herokuapps.com/api/v1`
102
+
To generate JWT Tokens for allowed services, run:
200
103
201
-
- Verification is similar to local verification, but you need to change `URL` in Postman to the Heroku app url `https://<your app name>.herokuapps.com/api/v1`
104
+
```bash
105
+
npm run generate-tokens
106
+
```
202
107
203
-
## Others
108
+
To view the Swagger UI interface visit `http://localhost:3000/docs`
0 commit comments