You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to import contents like app, HooksManager from this package (currently not possible), and integrate it with my sveltekit app backend, instead of hosting this gateway as another backend server. Example:
// hooks.server.tsimport{app,HooksManager}from'@portkey-ai/gateway'import{myPlugins}from'./myPlugins'consthooks=(c: Context,next: any)=>{consthooksManager=newHooksManager(myPlugins);c.set('hooksManager',hooksManager);c.set('executeHooks',hooksManager.executeHooks.bind(hooksManager));returnnext();};app.use('*',hooks);// this middleware comes last... I don't think it's gonna workexportasyncfunctionhandle(input){// ...if(url.startsWith('/v1'))returnapp.fetch(event.request,undefined,platform?.context)// ...}
Currently, I need to put this package into my project repo as git submodule to import app, .etc. I'd be happy if there's no need to use git submodule.
@noy4 We are not so sure that we want to publish an officially maintained package though, because it would mean maintenance with regards to compatibility in different environments, we've found it best to use the gateway as a standalone application
What Would You Like to See with the Gateway?
I'd like to import contents like
app
,HooksManager
from this package (currently not possible), and integrate it with my sveltekit app backend, instead of hosting this gateway as another backend server. Example:Currently, I need to put this package into my project repo as git submodule to import
app
, .etc. I'd be happy if there's no need to use git submodule.Hint
rollup.config.js
?Context for your Request
No response
Your Twitter/LinkedIn
No response
The text was updated successfully, but these errors were encountered: