Skip to content

Commit a21eb1c

Browse files
author
James Cori
committed
Merge branch 'develop'
2 parents 3aa69d8 + 6f5ef16 commit a21eb1c

18 files changed

+4943
-2912
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,19 @@ There are two parts need to be updated for local development
110110
- https://github.com/topcoder-platform/challenge-api/blob/develop/config/default.js#L27-L28
111111
Two aws config should be uncommented
112112

113+
and AUTH0 related configuration must be set at config file or in env variables.
113114

115+
### Deploy the app
116+
117+
- Follow the Notes section above
114118
- Install dependencies `npm install`
115119
- Run lint `npm run lint`
116120
- Run lint fix `npm run lint:fix`
117121
- initialize Elasticsearch, create configured Elasticsearch index if not present: `npm run init-es`,
118122
or re-create the index: `npm run init-es force`
119123
- Create tables `npm run create-tables`
120124
- Clear and init db `npm run init-db`
125+
- Seed tables: `npm run seed-tables`
121126
- Start app `npm start`
122127
- App is running at `http://localhost:3000`
123128

app-bootstrap.js

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ Joi.optionalId = () => Joi.string().uuid()
88
Joi.id = () => Joi.optionalId().required()
99
Joi.page = () => Joi.number().integer().min(1).default(1)
1010
Joi.perPage = () => Joi.number().integer().min(1).max(100).default(20)
11+
Joi.fileSize = () => Joi.number().integer().min(0).default(0)

app-constants.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ const validChallengeParams = {
4040
StartDate: 'startDate',
4141
ProjectId: 'projectId',
4242
Name: 'name',
43-
TypeId: 'typeId'
43+
TypeId: 'typeId',
44+
Prizes: 'overview.totalPrizes'
4445
}
4546

4647
const EVENT_ORIGINATOR = 'topcoder-challenges-api'
@@ -55,6 +56,7 @@ const DiscussionTypes = {
5556
const Topics = {
5657
ChallengeCreated: 'challenge.notification.create',
5758
ChallengeUpdated: 'challenge.notification.update',
59+
ChallengeDeleted: 'challenge.notification.delete',
5860
ChallengeTypeCreated: 'test.new.bus.events', // 'challenge.action.type.created',
5961
ChallengeTypeUpdated: 'test.new.bus.events', // 'challenge.action.type.updated',
6062
ChallengePhaseCreated: 'test.new.bus.events', // 'challenge.action.phase.created',
@@ -65,7 +67,10 @@ const Topics = {
6567
TimelineTemplateDeleted: 'test.new.bus.events', // 'challenge.action.timeline.template.deleted',
6668
ChallengeTypeTimelineTemplateCreated: 'test.new.bus.events', // 'challenge.action.type.timeline.template.created',
6769
ChallengeTypeTimelineTemplateUpdated: 'test.new.bus.events', // 'challenge.action.type.timeline.template.updated',
68-
ChallengeTypeTimelineTemplateDeleted: 'test.new.bus.events' // 'challenge.action.type.timeline.template.deleted'
70+
ChallengeTypeTimelineTemplateDeleted: 'test.new.bus.events', // 'challenge.action.type.timeline.template.deleted'
71+
ChallengeAttachmentCreated: 'test.new.bus.events', // 'challenge.action.attachment.created',
72+
ChallengeAttachmentUpdated: 'test.new.bus.events', // 'challenge.action.attachment.updated',
73+
ChallengeAttachmentDeleted: 'test.new.bus.events' // 'challenge.action.attachment.deleted',
6974
}
7075

7176
const challengeTracks = {

config/default.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ module.exports = {
2525
KAFKA_ERROR_TOPIC: process.env.KAFKA_ERROR_TOPIC || 'common.error.reporting',
2626

2727
AMAZON: {
28-
// AWS_ACCESS_KEY_ID: process.env.AWS_FAKE_ID,
29-
// AWS_SECRET_ACCESS_KEY: process.env.AWS_FAKE_KEY,
28+
// AWS_ACCESS_KEY_ID: process.env.AWS_FAKE_ID || 'FAKE_ACCESS_KEY',
29+
// AWS_SECRET_ACCESS_KEY: process.env.AWS_FAKE_KEY || 'FAKE_SECRET_ACCESS_KEY',
3030
AWS_REGION: process.env.AWS_REGION || 'ap-northeast-1',
3131
IS_LOCAL_DB: process.env.IS_LOCAL_DB || true,
32-
DYNAMODB_URL: process.env.DYNAMODB_URL || 'http://localhost:8000',
33-
ATTACHMENT_S3_BUCKET: process.env.ATTACHMENT_S3_BUCKET || 'my-testing-bucket-12345',
34-
S3_API_VERSION: process.env.S3_API_VERSION || '2006-03-01'
32+
DYNAMODB_URL: process.env.DYNAMODB_URL || 'http://localhost:7777',
33+
S3_API_VERSION: process.env.S3_API_VERSION || '2006-03-01',
34+
BUCKET_WHITELIST: process.env.BUCKET_WHITELIST || 'topcoder_01, topcoder_02'
3535
},
3636

3737
ES: {

0 commit comments

Comments
 (0)