function init(manifest) {
	const server = new Server(manifest);

	let init_promise = server.init({
		env: process.env,
		read: (file) => createReadableStream(`.netlify/server/${file}`)
	});

	return async (event, context) => {
		if (init_promise !== null) {
			await init_promise;
			init_promise = null;
		}

		const response = await server.respond(to_request(event), {
			platform: { context },
			getClientAddress() {
				return event.headers['x-nf-client-connection-ip'];
			}
		});

		const partial_response = {
			statusCode: response.status,
			...split_headers(response.headers)
		};

		if (!is_text(response.headers.get('content-type'))) {
			// Function responses should be strings (or undefined), and responses with binary
			// content should be base64 encoded and set isBase64Encoded to true.
			// https://github.com/netlify/functions/blob/main/src/function/response.ts
			return {
				...partial_response,
				isBase64Encoded: true,
				body: Buffer.from(await response.arrayBuffer()).toString('base64')
			};
		}

		return {
			...partial_response,
			body: await response.text()
		};
	};
}
@param {import('@sveltejs/kit').SSRManifest} manifest
@returns {import('@netlify/functions').Handler}