File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed
course-02/exercises/udacity-c2-restapi/src
controllers/v0/users/routes Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { config } from './config/config';
4
4
const c = config . dev ;
5
5
6
6
//Configure AWS
7
- var credentials = new AWS . SharedIniFileCredentials ( { profile : 'default' } ) ;
7
+ var credentials = new AWS . SharedIniFileCredentials ( { profile : c . aws_profile } ) ;
8
8
AWS . config . credentials = credentials ;
9
9
10
10
export const s3 = new AWS . S3 ( {
Original file line number Diff line number Diff line change 1
1
export const config = {
2
2
"dev" : {
3
- "username" : "" ,
4
- "password" : "" ,
5
- "database" : "" ,
6
- "host" : "" ,
3
+ "username" : process . env . POSTGRES_USERNAME ,
4
+ "password" : process . env . POSTGRES_PASSWORD ,
5
+ "database" : process . env . POSTGRES_DATABASE ,
6
+ "host" : process . env . POSTGRES_HOST ,
7
7
"dialect" : "postgres" ,
8
- "aws_region" : "us-east-2" ,
8
+ "aws_region" : process . env . AWS_REGION ,
9
9
"aws_profile" : "default" ,
10
- "aws_media_bucket" : "udagram-ruttner-dev"
10
+ "aws_media_bucket" : process . env . AWS_BUCKET
11
11
} ,
12
12
"prod" : {
13
13
"username" : "" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import { NextFunction } from 'connect';
8
8
9
9
import * as EmailValidator from 'email-validator' ;
10
10
11
+ import { config } from '../../../../config/config' ;
12
+
11
13
const router : Router = Router ( ) ;
12
14
13
15
async function generatePassword ( plainTextPassword : string ) : Promise < string > {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export const sequelize = new Sequelize({
11
11
"database" : c . database ,
12
12
"host" : c . host ,
13
13
14
- dialect : 'postgres' ,
15
- storage : ':memory:' ,
14
+ dialect : c . dialect ,
15
+ // storage: ':memory:',
16
16
} ) ;
17
17
You can’t perform that action at this time.
0 commit comments