Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ export default {
globalThis.LOGS_BUCKET = env.LOGS_BUCKET
globalThis.REQUEST_ANALYTICS = env.REQUEST_ANALYTICS
globalThis.API_TEST_USERAGENT = env.API_TEST_USERAGENT
globalThis.ENVIRONMENT = env.ENVIRONMENT

const startTime = Date.now()
const url = new URL(request.url)
Expand Down
5 changes: 4 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"publish": "wrangler publish"
"publish": "wrangler publish",
"deploy:staging": "wrangler deploy --env staging",
"deploy:production": "wrangler deploy --env production",
"tail:staging": "wrangler tail --env staging"
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions src/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ bucket_name = "evergreen-api"
binding = "REQUEST_ANALYTICS"
dataset = "evergreen_requests"

# Staging: https://evergreen-api-staging.stealthpuppy.workers.dev
# Shares the production EVERGREEN KV namespace (read-only usage), but logs/analytics are kept separate
[env.staging]
name = "evergreen-api-staging"
vars = { ENVIRONMENT = "staging" }
Expand Down
3 changes: 2 additions & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"test": "mocha"
"test": "mocha",
"test:staging": "API_BASE_URL=https://evergreen-api-staging.stealthpuppy.workers.dev mocha"
},
"devDependencies": {
"chai": "^6.2.2",
Expand Down
Loading