-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
The readme in adapter-node linked from the svelte kit docs says:
The adapter exports a middleware (req, res, next) => {} that's compatible with Express / Connect / Polka. Additionally, it also exports a reference server implementation using this middleware with a plain Node HTTP server.
But you can use your favorite server framework to combine it with other middleware and server logic. You can import kitMiddleware, your ready-to-use SvelteKit bundle as middleware, from ./build/middlewares.js.
But I cannot find any middleware created by the adapter. I only have an index.js file in the build directory (besides the assets).
Is this an issue with the readme or with some configuration? Is there a way to get a middleware from adapter-node?
Reproduction
Repo: https://github.com/bdadam/svelte-kit-adapter-node-reproduction
The generated dist directory is also pushed to the repository.
Logs
No response
System Info
npx envinfo --system --binaries --browsers --npmPackages "{svelte,@sveltejs/*,vite}"
System:
OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa)
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.8.0 - ~/.volta/tools/image/node/16.8.0/bin/node
Yarn: 1.22.10 - ~/.volta/tools/image/yarn/1.22.10/bin/yarn
npm: 7.21.0 - ~/.volta/tools/image/node/16.8.0/bin/npm
npmPackages:
@sveltejs/adapter-node: ^1.0.0-next.43 => 1.0.0-next.43
@sveltejs/kit: next => 1.0.0-next.160
svelte: ^3.34.0 => 3.42.4Severity
serious, but I can work around it
Additional Information
No response