Skip to content

Commit a5d3fe4

Browse files
author
vikasrohit
authored
Merge pull request #1172 from appirio-tech/dev
Promoting Post Editor changes to production
2 parents 504ac4a + 2c8509c commit a5d3fe4

39 files changed

+6268
-6655
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,5 @@ SCSS Files
130130
- Configure Emmet to work with React, e.g. classes expand to `className` instead of `class`
131131
- Follow the instructions under [Get Emmet working](http://www.nitinh.com/2015/02/setting-sublime-text-react-jsx-development/)
132132
- **Note:** Add the last snippet of code to `reg_replace.sublime-settings` by navigating to `Sublime Text -> Preferences -> Package Settings -> Reg Replace -> Settings-User`
133+
134+
© 2017 Topcoder. All Rights Reserved

docs/LocalSetup.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Start tc-message-service
2+
3+
Follow ``tc-message-service/local/README.md`` to setup the Discourse and tc-message-service locally.
4+
5+
- Note the Discourse has some strict validation constraints and we can loose them for dev (For example by default Discourse has **mailinator.com** email domain in blacklist, but we'll use some test users which have **mailinator.com** email addresses).
6+
7+
```shell
8+
# Disable the email domain blacklist by setting an empty string
9+
curl -X PUT 'http://talk.topcoder-dev.com:3002/admin/site_settings/email_domains_blacklist?api_key=<api_key>&api_username=system' -H 'content-type: application/x-www-form-urlencoded' -d email_domains_blacklist=''
10+
11+
# Refer to tc-message-service/local/README.md for more commands to configure Discourse
12+
......
13+
```
14+
15+
16+
17+
- Note the jwt token got from accounts.topcoder-dev.com cannot be verified locally (not knowing its secret key), so we'll use a loose auth strategy which just decodes the token without verfiying its signature. Start the tc-message-server by prepending *TC_MESSAGE_SERVICE_AUTH_LOOSE=true*:
18+
19+
```shell
20+
TC_MESSAGE_SERVICE_AUTH_LOOSE=true npm run start:dev
21+
```
22+
23+
The message service will be started at 8001 port.
24+
25+
26+
27+
# Configure reference lookup
28+
29+
Login to postgres either by install psql locally, or entering the postgres docker container:
30+
31+
```shell
32+
psql messages coder -h local.topcoder-dev.com
33+
```
34+
35+
And execute the following statement:
36+
37+
```sql
38+
INSERT INTO "referenceLookups" (reference, endpoint, "createdAt", "updatedAt") VALUES ('project', 'https://api.topcoder-dev.com/v4/projects/{id}', now(), now());
39+
```
40+
41+
42+
43+
# Start connect-app
44+
45+
```shell
46+
CONNECT_MESSAGE_API_URL=http://localhost:8001 npm start
47+
```
48+
49+
The connect app will be started at 3000 port.

0 commit comments

Comments
 (0)