Home / Function/ start() — astro Function Reference

start() — astro Function Reference

Architecture documentation for the start() function in server.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  c8736ba9_969c_c9f7_d537_be94cf1c43cd["start()"]
  3d1ffe9b_acaf_0628_7657_d34856e4c8a2["server.ts"]
  c8736ba9_969c_c9f7_d537_be94cf1c43cd -->|defined in| 3d1ffe9b_acaf_0628_7657_d34856e4c8a2
  5ad5eb83_7bec_ad82_1f09_03d3cc805651["readHeadersJson()"]
  c8736ba9_969c_c9f7_d537_be94cf1c43cd -->|calls| 5ad5eb83_7bec_ad82_1f09_03d3cc805651
  style c8736ba9_969c_c9f7_d537_be94cf1c43cd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/node/src/server.ts lines 33–48

export function start(manifest: SSRManifest, options: Options) {
	if (options.mode !== 'standalone' || process.env.ASTRO_NODE_AUTOSTART === 'disabled') {
		return;
	}

	let headersMap: NodeAppHeadersJson | undefined = undefined;
	if (options.staticHeaders) {
		headersMap = readHeadersJson(manifest.outDir);
	}

	const app = new NodeApp(manifest, !options.experimentalDisableStreaming);
	if (headersMap) {
		app.setHeadersMap(headersMap);
	}
	startServer(app, options);
}

Domain

Subdomains

Frequently Asked Questions

What does start() do?
start() is a function in the astro codebase, defined in packages/integrations/node/src/server.ts.
Where is start() defined?
start() is defined in packages/integrations/node/src/server.ts at line 33.
What does start() call?
start() calls 1 function(s): readHeadersJson.

Analyze Your Own Codebase

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

Try Supermodel Free