Package Exports
- @thebrenny/svelte-adapter-h3
- @thebrenny/svelte-adapter-h3/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@thebrenny/svelte-adapter-h3) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
SvelteKit H3 adapter
Adapter for SvelteKit apps that generates a H3 server.
Installation
npm install svelte-adapter-h3Usage
SvelteKit Config
import adapter from "svelte-adapter-h3";
export default {
kit: {
adapter: adapter()
}
};To start up the default server, execute the following command.
$ npm build
$ node build/index.jsCustom server
import { H3, serve } from "h3";
import { handler } from "./build/handler.js";
const app = new H3();
app.get("/api", () => "your api routes");
app.all("/", ({ req }) => handler.fetch(req)); // can't `use` or `mount` because of middleware hoisting
serve(app);Enviroment variables
svelte-adapter-h3 employs the same environment variables as adapter-node.
Options
svelte-adapter-h3 employs the same options as adapter-node.