mirror of
https://github.com/ringtools/ringtools-web-v2.git
synced 2025-02-21 22:11:37 +01:00
Use environment for api endpoint
This commit is contained in:
parent
4155436820
commit
e94e21f516
9 changed files with 18 additions and 8 deletions
1
.env.sample
Normal file
1
.env.sample
Normal file
|
@ -0,0 +1 @@
|
|||
API_ENDPOINT=http://localhost:7464
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -47,3 +47,4 @@ cypress/results/*
|
|||
cypress/reports/*
|
||||
cypress/screenshots/*
|
||||
cypress/videos/*
|
||||
.env
|
|
@ -45,7 +45,7 @@
|
|||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "500kb",
|
||||
"maximumError": "1mb"
|
||||
"maximumError": "2mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
|
|
|
@ -64,6 +64,8 @@
|
|||
"@types/node": "^17.0.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.9",
|
||||
"@typescript-eslint/parser": "^5.9",
|
||||
"cypress": "latest",
|
||||
"dotenv": "^14.1.0",
|
||||
"eslint": "^8.2.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
|
@ -75,6 +77,6 @@
|
|||
"karma-jasmine-html-reporter": "~1.7.0",
|
||||
"prettier": "^2.5.1",
|
||||
"typescript": "~4.5.2",
|
||||
"cypress": "latest"
|
||||
"yargs": "^17.3.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,8 +161,6 @@ export class SettingsComponent implements OnInit {
|
|||
this.ringForm.get('size')?.patchValue(capacity);
|
||||
}
|
||||
|
||||
exportJSON() {}
|
||||
|
||||
saveRingSettings() {
|
||||
const ringName = this.ringForm.get('name')?.value;
|
||||
const ringSize = this.ringForm.get('size')?.value;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
export const environment = {
|
||||
production: true
|
||||
production: true,
|
||||
networkClass: null,
|
||||
apiEndpoint: "https://rof.tools"
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
export const environment = {
|
||||
production: false,
|
||||
networkClass: null,
|
||||
apiEndpoint: 'http://localhost:7464'
|
||||
apiEndpoint: process.env['API_ENDPOINT']
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
"lib": [
|
||||
"es2020",
|
||||
"dom"
|
||||
]
|
||||
],
|
||||
"types": ["node"]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
|
|
|
@ -3844,6 +3844,11 @@ domutils@^2.8.0:
|
|||
domelementtype "^2.2.0"
|
||||
domhandler "^4.2.0"
|
||||
|
||||
dotenv@^14.1.0:
|
||||
version "14.1.0"
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-14.1.0.tgz#66e9c0c448501b006f4dd9f08080c9011c7a5e6c"
|
||||
integrity sha512-h8V+Yfa8m0YSjf3Rgbno51cxWldb4PEixIJVL55VmW7uAfeLQKiaPrEUiBps+ARK9MeqjJgTf269OMmu6lOODQ==
|
||||
|
||||
dragula@^3.7.2:
|
||||
version "3.7.3"
|
||||
resolved "https://registry.yarnpkg.com/dragula/-/dragula-3.7.3.tgz#909460fd0b4acba5409c6dbb1b64d24f5bc9efb6"
|
||||
|
@ -8378,7 +8383,7 @@ yargs@^16.1.1:
|
|||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
||||
|
||||
yargs@^17.2.1:
|
||||
yargs@^17.2.1, yargs@^17.3.1:
|
||||
version "17.3.1"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.3.1.tgz#da56b28f32e2fd45aefb402ed9c26f42be4c07b9"
|
||||
integrity sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==
|
||||
|
|
Loading…
Add table
Reference in a new issue