Home / Function/ render() — astro Function Reference

render() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  5ea5476f_923b_4fa5_df74_29602f99597c["render()"]
  6246d4e3_f4b0_188d_09b7_f93816624730["MyApp"]
  5ea5476f_923b_4fa5_df74_29602f99597c -->|defined in| 6246d4e3_f4b0_188d_09b7_f93816624730
  style 5ea5476f_923b_4fa5_df74_29602f99597c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmark/packages/adapter/src/server.ts lines 16–25

	async render(request: Request) {
		const url = new URL(request.url);
		if (this.#manifest?.assets.has(url.pathname)) {
			const filePath = new URL('../../client/' + this.removeBase(url.pathname), import.meta.url);
			const data = await fs.promises.readFile(filePath);
			return new Response(Buffer.from(data));
		}

		return super.render(request);
	}

Subdomains

Frequently Asked Questions

What does render() do?
render() is a function in the astro codebase, defined in benchmark/packages/adapter/src/server.ts.
Where is render() defined?
render() is defined in benchmark/packages/adapter/src/server.ts at line 16.

Analyze Your Own Codebase

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

Try Supermodel Free