router: Express-style imperative router.compose: A middleware system for combining multiple handlers into a single one.polyfills: A collection of polyfills used by adapters for compatibility across platforms.bundler-netlify: Netlify edge and Netlify functions.bundler-vercel: Vercel edge and serverless functions.bundler-cloudflare-workers: Cloudflare Workers.These packages provide bundlers fine-tuned for their respective platforms: Bundlers: Worker and serverless platforms usually require your code to be in bundled form.adapter-netlify-edge: Netlify Edge Functions.adapter-netlify-functions: Netlify Functions.adapter-vercel-edge: Vercel Edge Functions.adapter-cloudflare-workers: Cloudflare Workers. Also works for Vercel Serverless Functions. adapter-node: Node.js, either as a standalone server or as a middleware function that can be used with Express and similar frameworks.Adapters: Enable HatTip to run on any platform:.core: A type-only package that defines the interface between your application and platform adapters.HatTip is extremely modular so you can use as little or as much as you need: Everything else is middleware functions similar the above that add various features and development tools to make your life easier. Handlers can also set context.handleError to handle uncaught errors. export default ( context ) => export default compose ( urlParser, poweredBy, homeHandler, fooHandler, barHandler, ) Ī handler can return or throw a Response or anything with a toResponse method when used with the compose function. handler.js // This request handler works anywhere, e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |