Home / File/ server.ts — astro Source File

server.ts — astro Source File

Architecture documentation for server.ts, a typescript file in the astro codebase. 3 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  3bf6a903_ca52_b5ab_04e4_e3503f1a42dc["server.ts"]
  c2f6615e_96e9_c4eb_5f71_cf120e271705["node:http"]
  3bf6a903_ca52_b5ab_04e4_e3503f1a42dc --> c2f6615e_96e9_c4eb_5f71_cf120e271705
  f16d8c76_2866_6150_bd14_0347b59abfe9["astro"]
  3bf6a903_ca52_b5ab_04e4_e3503f1a42dc --> f16d8c76_2866_6150_bd14_0347b59abfe9
  8d666858_ab9a_2697_4536_5cb6ce038643["node"]
  3bf6a903_ca52_b5ab_04e4_e3503f1a42dc --> 8d666858_ab9a_2697_4536_5cb6ce038643
  style 3bf6a903_ca52_b5ab_04e4_e3503f1a42dc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import type { IncomingMessage, ServerResponse } from 'node:http';
import type { SSRManifest } from 'astro';
import { NodeApp } from 'astro/app/node';

export function createExports(manifest: SSRManifest) {
	const app = new NodeApp(manifest);
	return {
		handler: async (req: IncomingMessage, res: ServerResponse) => {
			const start = performance.now();
			await app.render(req);
			const end = performance.now();
			res.write(end - start + '');
			res.end();
		},
	};
}

Subdomains

Functions

Dependencies

  • astro
  • node
  • node:http

Frequently Asked Questions

What does server.ts do?
server.ts is a source file in the astro codebase, written in typescript. It belongs to the PerformanceBenchmarking domain, ProjectGenerator subdomain.
What functions are defined in server.ts?
server.ts defines 1 function(s): createExports.
What does server.ts depend on?
server.ts imports 3 module(s): astro, node, node:http.
Where is server.ts in the architecture?
server.ts is located at benchmark/packages/timer/src/server.ts (domain: PerformanceBenchmarking, subdomain: ProjectGenerator, directory: benchmark/packages/timer/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free