Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit af9a4ff

Browse files
author
Jasmine Wang
committed
Updated config files for created resources
1 parent 0093626 commit af9a4ff

File tree

6 files changed

+19
-54
lines changed

6 files changed

+19
-54
lines changed

app.js

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ var cookieParser = require('cookie-parser');
66
var bodyParser = require('body-parser');
77

88
var routes = require('./routes/index');
9-
var api = require('./routes/api');
109

1110
var app = express();
1211

@@ -23,7 +22,6 @@ app.use(bodyParser.urlencoded({ extended: false }));
2322
app.use(cookieParser());
2423
app.use(express.static(path.join(__dirname, 'dist')));
2524

26-
app.use('/api', api);
2725
app.use('/', routes);
2826

2927
// catch 404 and forward to error handler

app_config.json

-7
This file was deleted.

aws/createResources.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
ROOT_NAME=budilovdeletecogdemo
3+
ROOT_NAME=budilovdelete
44
# Bucket name must be all lowercase, and start/end with lowecase letter or number
55
# $(echo...) code to work with versions of bash older than 4.0
66
BUCKET_NAME=budilov-$(echo "$ROOT_NAME" | tr '[:upper:]' '[:lower:]')
@@ -13,6 +13,7 @@ REGION=us-west-2
1313
EB_INSTANCE_TYPE=t2.small
1414
EB_PLATFORM=node.js
1515
CURR_DIR=$( cd $(dirname $0) ; pwd -P )
16+
ROOT_DIR=$CURR_DIR/..
1617

1718
DDB_TABLE_ARN=""
1819
IDENTITY_POOL_ID=""
@@ -29,7 +30,7 @@ createS3Bucket() {
2930
aws s3api put-bucket-policy --bucket $BUCKET_NAME --policy file:///tmp/s3-bucket-policy.json
3031
#Build the project and sync it up to the bucket
3132
ng build --prod ../
32-
aws s3 sync ../dist/ s3://$BUCKET_NAME/
33+
aws s3 sync $ROOT_DIR/dist/ s3://$BUCKET_NAME/
3334
}
3435

3536
createDDBTable() {
@@ -84,7 +85,7 @@ createCognitoResources() {
8485
}
8586

8687
createEBResources() {
87-
cd $CURR_DIR/../
88+
cd $ROOT_DIR
8889
sleep 1
8990
eb init $ROOT_NAME --region $REGION --platform $EB_PLATFORM
9091
sleep 1
@@ -122,7 +123,7 @@ export const environment = {
122123
};
123124
124125
EOF
125-
) > $CURR_DIR/../src/environments/environment.ts
126+
) > $ROOT_DIR/src/environments/environment.ts
126127

127128
(
128129
cat <<EOF
@@ -143,9 +144,9 @@ export const environment = {
143144
};
144145
145146
EOF
146-
) > $CURR_DIR/../src/environments/environment.prod.ts
147+
) > $ROOT_DIR/src/environments/environment.prod.ts
147148

148-
cd $CURR_DIR/../
149+
cd $ROOT_DIR
149150
git add .
150151
git commit -m "Updated config files for created resources"
151152
cd $CURR_DIR

routes/api.js

-27
This file was deleted.

src/environments/environment.prod.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
export const environment = {
22
production: true,
33

4-
region: 'us-west-2',
4+
region: 'not set',
55

6-
identityPoolId: 'us-west-2:30cc6631-6472-4103-b89f-3c1df50c7f62',
7-
userPoolId: 'us-west-2_lsVAem5p6',
8-
clientId: '7sqsf676q7cjofded0q9ck2fpl',
6+
identityPoolId: 'not set',
7+
userPoolId: 'not set',
8+
clientId: 'not set',
99

1010
rekognitionBucket: 'rekognition-pics',
1111
albumName: "usercontent",
12-
bucketRegion: 'us-west-2',
12+
bucketRegion: 'not set',
1313

14-
ddbTableName: 'LoginTrailbudilovdeletecogdemo'
14+
ddbTableName: 'not set'
1515
};
1616

src/environments/environment.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
export const environment = {
22
production: false,
33

4-
region: 'us-west-2',
4+
region: 'not set',
55

6-
identityPoolId: 'us-west-2:30cc6631-6472-4103-b89f-3c1df50c7f62',
7-
userPoolId: 'us-west-2_lsVAem5p6',
8-
clientId: '7sqsf676q7cjofded0q9ck2fpl',
6+
identityPoolId: 'not set',
7+
userPoolId: 'not set',
8+
clientId: 'not set',
99

1010
rekognitionBucket: 'rekognition-pics',
1111
albumName: "usercontent",
12-
bucketRegion: 'us-west-2',
12+
bucketRegion: 'not set',
1313

14-
ddbTableName: 'LoginTrailbudilovdeletecogdemo'
14+
ddbTableName: 'not set'
1515
};
1616

0 commit comments

Comments
 (0)