Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# can be used locally to config some env variables and after apply them using `source .env`
.env
### Node ###
# Logs
logs
*.log
npm-debug.log*
.DS_Store
.tern-port
*#

dist/

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm


.DS_Store
.idea
.vscode/
9 changes: 4 additions & 5 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ To make local development easier, I create a mock server at `mock`.

You can start it with `node mock/mock-api.js` and it will listen to port `4000`

This mock service will simulate request and responses for other APIs like auth0 and event bus API.

## Local Configs

Please run following commands to set necessary configs:
Expand All @@ -147,13 +149,11 @@ export AUTH0_URL="http://localhost:4000/v5/auth0"
export BUSAPI_URL="http://localhost:4000/v5"
export AUTH0_CLIENT_ID=xyz
export AUTH0_CLIENT_SECRET=xyz
export LOOKER_API_BASE_URL="http://localhost:4000/v5/looker"
export LOOKER_API_CLIENT_ID=xyz
export LOOKER_API_CLIENT_SECRET=xyz
export USERFLOW_PRIVATE_KEY=mysecret
export GROUPS_API_URL="http://localhost:4000/v5/groups"
```

These commands will set auth0, event bus pi and looker api to local mock server.
These commands will set auth0 and event bus api to local mock server.

## Local Deployment

Expand All @@ -172,7 +172,6 @@ Make sure you have followed above steps to
- setup local mock api and set local configs
- it will really call service and mock api

Unit tests use `aws-sdk-mock` to mock S3 operations. So you can safely run tests without S3 configs.

Then you can run:
```bash
Expand Down
1 change: 1 addition & 0 deletions Verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Just be careful about the schemas used for different kind of trait.
There are some changes to prisma schema.

- Add memberTraits.hobby
- Update memberSkill.displayMode to optional
- Remove displayMode.memberSkills @ignore
- Add stats fields as discussed in forum

2 changes: 1 addition & 1 deletion app-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* App constants
*/
const ADMIN_ROLES = ['administrator', 'admin']
const SEARCH_BY_EMAIL_ROLES = ADMIN_ROLES.concat('tgadmin');
const SEARCH_BY_EMAIL_ROLES = ADMIN_ROLES.concat('tgadmin')
const AUTOCOMPLETE_ROLES = ['copilot', 'administrator', 'admin', 'Connect Copilot', 'Connect Account Manager', 'Connect Admin', 'Account Executive']

const EVENT_ORIGINATOR = 'topcoder-member-api'
Expand Down
16 changes: 1 addition & 15 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ module.exports = {
}
},


// Member identifiable info fields, copilots, admins, or M2M can get these fields
// Anyone in the constants.AUTOCOMPLETE_ROLES will have access to these fields
COMMUNICATION_SECURE_FIELDS: process.env.COMMUNICATION_SECURE_FIELDS
Expand Down Expand Up @@ -120,20 +119,7 @@ module.exports = {
MAMBO_DOMAIN_URL: process.env.MAMBO_DOMAIN_URL,
MAMBO_DEFAULT_SITE: process.env.MAMBO_DEFAULT_SITE,

// Looker API access config
LOOKER: {
API_BASE_URL: process.env.LOOKER_API_BASE_URL,
API_CLIENT_ID: process.env.LOOKER_API_CLIENT_ID,
API_CLIENT_SECRET: process.env.LOOKER_API_CLIENT_SECRET,
EMBED_KEY: process.env.LOOKER_EMBED_KEY,
HOST: process.env.LOOKER_HOST,
SESSION_LENGTH: 1800,
TOKEN: process.env.LOOKER_API_TOKEN || 'TOKEN',
//24 hours, in milliseconds
CACHE_DURATION: 1000 * 60 * 60 * 24
},

HASHING_KEYS: {
USERFLOW: process.env.USERFLOW_PRIVATE_KEY,
USERFLOW: process.env.USERFLOW_PRIVATE_KEY
}
}
Loading