eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 685 B
JavaScript
function GET(e,t){return{transport:`http`,method:`GET`,path:e,handler:t}}function POST(e,t){return{transport:`http`,method:`POST`,path:e,handler:t}}function PUT(e,t){return{transport:`http`,method:`PUT`,path:e,handler:t}}function PATCH(e,t){return{transport:`http`,method:`PATCH`,path:e,handler:t}}function DELETE(e,t){return{transport:`http`,method:`DELETE`,path:e,handler:t}}function WS(e,t){return{transport:`websocket`,method:`WEBSOCKET`,path:e,handler:t}}function isHttpRouteDefinition(e){return e.transport!==`websocket`}function isWebSocketRouteDefinition(e){return e.transport===`websocket`}export{DELETE,GET,PATCH,POST,PUT,WS,isHttpRouteDefinition,isWebSocketRouteDefinition};