Skip to content

Commit

Permalink
Created stage env
Browse files Browse the repository at this point in the history
Addresses #28
Created separated stage environment for hosting at dashboard-dev.petabencana.id
Dev environment to be used for local development, bypasses auth lock
  • Loading branch information
ojha-url committed Feb 15, 2018
1 parent 818bcc1 commit 666655b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"stage": "environments/environment.stage.ts",
"prod": "environments/environment.prod.ts"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class AuthService implements CanActivate {
}

canActivate() {
if (this.isAuthenticated()) {
if (environment.envName === 'dev' || this.isAuthenticated()) {
return true;
}

Expand Down
1 change: 1 addition & 0 deletions src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const environment = {
envName: 'prod',
production: true,

data_server: 'https://data.petabencana.id/',
Expand Down
23 changes: 23 additions & 0 deletions src/environments/environment.stage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export const environment = {
envName: 'stage',
production: false,

data_server: 'https://data-dev.petabencana.id/',
instance_region: 'jbd',

auth0_client_id: 'KoKRTjjUC7CpdS770rp29WZyeS73mR1x',
auth0_domain: 'dev-riskmap.auth0.com',
auth0_callbackURL: 'https://dashboard-dev.petabencana.id/callback',

locales: {
supportedLanguages: [
{code: 'en', name: 'English'},
{code: 'id', name: 'Bahasa'}
],
defaultLanguage: 'en'
},
timezones: {
locale: 'id',
tz: 'Asia/Jakarta'
}
};
3 changes: 2 additions & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
export const environment = {
envName: 'dev',
production: false,

data_server: 'https://data-dev.petabencana.id/',
instance_region: 'jbd',

auth0_client_id: 'KoKRTjjUC7CpdS770rp29WZyeS73mR1x',
auth0_domain: 'dev-riskmap.auth0.com',
auth0_callbackURL: 'https://dashboard-dev.petabencana.id/callback',
auth0_callbackURL: 'http://localhost:4200/callback',

locales: {
supportedLanguages: [
Expand Down

0 comments on commit 666655b

Please sign in to comment.