Skip to content

Commit a5acd96

Browse files
committed
πŸš€ env vars
1 parent cb84066 commit a5acd96

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

β€Ž.env.exampleβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AUTH_TOKEN=example-token
1+
API_TOKEN=example-token
22

33
MONITOR_URLS=https://unvanity.com,https://google.com
44
MONITOR_VALID_STATUSES=200,404

β€Ž.env.example.buildβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
AUTH_TOKEN=example-token
1+
API_TOKEN=example-token

β€Žclient/stores.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function createFetch(baseUrl, updateData = (_, data) => data) {
2929
return fetch(url, {
3030
query,
3131
headers: {
32-
Authorization: `Bearer ${AUTH_TOKEN}`,
32+
Authorization: `Bearer ${API_TOKEN}`,
3333
accepts: 'application/json',
3434
},
3535
})

β€Žconfig.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { splitArray } from './lib/utils'
22

33
export default {
4-
token: process.env.AUTH_TOKEN,
4+
token: process.env.API_TOKEN,
55
monitor: {
66
urls: splitArray(process.env.MONITOR_URLS),
77
validStatuses: splitArray(process.env.MONITOR_VALID_STATUSES),

β€Žnow.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"env": {
3-
"AUTH_TOKEN": "@token",
3+
"API_TOKEN": "@token",
44
"MONITOR_URLS": "@monitor_urls",
55
"MONITOR_VALID_STATUSES": "@monitor_valid_statuses"
66
},
77
"build": {
88
"env": {
9-
"AUTH_TOKEN": "@auth_token"
9+
"API_TOKEN": "@api_token"
1010
}
1111
}
1212
}

β€Žpackage.jsonβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,11 @@
9797
"singleQuote": true,
9898
"trailingComma": "es5",
9999
"semi": false
100+
},
101+
"husky": {
102+
"hooks": {
103+
"pre-commit": "npm run lint",
104+
"pre-push": "npm run test"
105+
}
100106
}
101107
}

β€Žrollup.config.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
}),
3131

3232
replace({
33-
AUTH_TOKEN: `"${process.env.AUTH_TOKEN}"`,
33+
API_TOKEN: `"${process.env.API_TOKEN}"`,
3434
}),
3535

3636
// If you have external dependencies installed from

0 commit comments

Comments
Β (0)