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