Skip to content

Commit

Permalink
fix(context): env variables loading for runtimes other than CF
Browse files Browse the repository at this point in the history
closes #55
  • Loading branch information
schettn committed Nov 20, 2024
1 parent b5a0727 commit 80d3d82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/pylon/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {Toucan} from 'toucan-js'
import {AuthState} from './auth'
import {AsyncLocalStorage} from 'async_hooks'
import {sendFunctionEvent} from '@getcronit/pylon-telemetry'
import {env} from 'hono/adapter'

export interface Bindings {
NODE_ENV: string
Expand Down Expand Up @@ -38,6 +39,8 @@ export const getContext = () => {
throw new Error('Context not defined')
}

ctx.env = env(ctx)

return ctx
}

Expand Down

1 comment on commit 80d3d82

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for pylon-docs ready!

✅ Preview
https://pylon-docs-ml82wonm8-schettns-projects.vercel.app

Built with commit 80d3d82.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.