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
Copy file name to clipboardExpand all lines: packages/adapter-node/README.md
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,10 @@ export default {
27
27
28
28
## Options
29
29
30
+
### entryPoint
31
+
32
+
The server entry point. Allows you to provide a [custom server implementation](#middleware). Defaults to the provided reference server.
33
+
30
34
### out
31
35
32
36
The directory to build the server to. It defaults to `build` — i.e. `node build` would start the server locally after it has been created.
@@ -49,28 +53,29 @@ You can specify different environment variables if necessary using the `env` opt
49
53
50
54
The adapter exports a middleware `(req, res, next) => {}` that's compatible with [Express](https://github.com/expressjs/expressjs.com) / [Connect](https://github.com/senchalabs/connect) / [Polka](https://github.com/lukeed/polka). Additionally, it also exports a reference server implementation using this middleware with a plain Node HTTP server.
51
55
52
-
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`.
56
+
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 middleware from the `build` directory. You can use [the `entryPoint` option](#entryPoint) to bundle your custom server entry point.
53
57
54
-
```
55
-
import { assetsMiddleware, prerenderedMiddleware, kitMiddleware } from './build/middlewares.js';
0 commit comments