Skip to content

Commit

Permalink
added env
Browse files Browse the repository at this point in the history
  • Loading branch information
mymi14s committed Dec 6, 2021
1 parent aa91489 commit ebc0d3d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ node_modules
.env
.env.local
.env.*.local
appConfig.json

# Log files
npm-debug.log*
Expand Down
4 changes: 2 additions & 2 deletions appConfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"domain": process.env.frappevue_domain,
"frappe_custom_app":process.env.frappevue_app
"domain": "https://chiosa.nord-streams.com",
"frappe_custom_app":"chiosa_app"
}
30 changes: 22 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@vue/devtools": "^5.3.4",
"core-js": "^3.6.5",
"cors": "^2.8.5",
"dotenv": "^10.0.0",
"serve": "^13.0.2",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0",
Expand Down
5 changes: 3 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import appConfig from '../appConfig';
const dotenv = require('dotenv');
dotenv.config();

export default {
name: 'utils',
Expand All @@ -13,7 +14,7 @@ export default {
// this.stack = <call stack>;
}
async login(body){
let res = await fetch(`${this.url}/api/method/${appConfig.frappe_custom_app}.authentication.login`, {
let res = await fetch(`${this.url}/api/method/${process.env.frappevue_app}.authentication.login`, {
method: 'POST',
headers: this.headers,
body: JSON.stringify(body)
Expand Down

0 comments on commit ebc0d3d

Please sign in to comment.