tsx
import { createHandler(alias) function createHandler(fn: (context: PageEvent) => unknown, options?: HandlerOptions | ((context: PageEvent) => HandlerOptions | Promise<HandlerOptions>) | undefined): any
import createHandler
, StartServer(alias) function StartServer(props: {
document: Component<DocumentComponentProps>;
}): JSX.Element
import StartServer
} from "@solidjs/start/server";
export default createHandler(alias) createHandler(fn: (context: PageEvent) => unknown, options?: HandlerOptions | ((context: PageEvent) => HandlerOptions | Promise<HandlerOptions>) | undefined): any
import createHandler
(() => ( <StartServer(alias) function StartServer(props: {
document: Component<DocumentComponentProps>;
}): JSX.Element
import StartServer
document(property) document: Component<DocumentComponentProps>
={({ assets(parameter) assets: JSX.Element
, children(parameter) children: JSX.Element
, scripts(parameter) scripts: JSX.Element
}) => ( <html(property) JSX.HTMLElementTags.html: JSX.HTMLAttributes<HTMLHtmlElement>
lang(property) JSX.HTMLAttributes<HTMLHtmlElement>.lang?: string | undefined
="en"> <head(property) JSX.HTMLElementTags.head: JSX.HTMLAttributes<HTMLHeadElement>
> <meta(property) JSX.HTMLElementTags.meta: JSX.MetaHTMLAttributes<HTMLMetaElement>
charset(property) JSX.MetaHTMLAttributes<HTMLMetaElement>.charset?: string | undefined
="utf-8" /> <meta(property) JSX.HTMLElementTags.meta: JSX.MetaHTMLAttributes<HTMLMetaElement>
name(property) JSX.MetaHTMLAttributes<HTMLMetaElement>.name?: string | undefined
="viewport" content(property) JSX.MetaHTMLAttributes<HTMLMetaElement>.content?: string | undefined
="width=device-width, initial-scale=1" /> <link(property) JSX.HTMLElementTags.link: JSX.LinkHTMLAttributes<HTMLLinkElement>
rel(property) JSX.LinkHTMLAttributes<HTMLLinkElement>.rel?: string | undefined
="icon" href(property) JSX.LinkHTMLAttributes<HTMLLinkElement>.href?: string | undefined
="/favicon.ico" /> {assets(parameter) assets: JSX.Element
} </head(property) JSX.HTMLElementTags.head: JSX.HTMLAttributes<HTMLHeadElement>
> <body(property) JSX.HTMLElementTags.body: JSX.HTMLAttributes<HTMLBodyElement>
> <div(property) JSX.HTMLElementTags.div: JSX.HTMLAttributes<HTMLDivElement>
id(property) JSX.HTMLAttributes<HTMLDivElement>.id?: string | undefined
="app">{children(parameter) children: JSX.Element
}</div(property) JSX.HTMLElementTags.div: JSX.HTMLAttributes<HTMLDivElement>
> {scripts(parameter) scripts: JSX.Element
} </body(property) JSX.HTMLElementTags.body: JSX.HTMLAttributes<HTMLBodyElement>
> </html(property) JSX.HTMLElementTags.html: JSX.HTMLAttributes<HTMLHtmlElement>
> )}
/>
));
tsx
import { createHandler(alias) function createHandler(fn: (context: PageEvent) => unknown, options?: HandlerOptions | ((context: PageEvent) => HandlerOptions | Promise<HandlerOptions>) | undefined): any
import createHandler
, StartServer(alias) function StartServer(props: {
document: Component<DocumentComponentProps>;
}): JSX.Element
import StartServer
} from "@solidjs/start/server";
export default createHandler(alias) createHandler(fn: (context: PageEvent) => unknown, options?: HandlerOptions | ((context: PageEvent) => HandlerOptions | Promise<HandlerOptions>) | undefined): any
import createHandler
(() => ( <StartServer(alias) function StartServer(props: {
document: Component<DocumentComponentProps>;
}): JSX.Element
import StartServer
document(property) document: Component<DocumentComponentProps>
={({ assets(parameter) assets: JSX.Element
, children(parameter) children: JSX.Element
, scripts(parameter) scripts: JSX.Element
}) => ( <html(property) JSX.HTMLElementTags.html: JSX.HTMLAttributes<HTMLHtmlElement>
lang(property) JSX.HTMLAttributes<HTMLHtmlElement>.lang?: string | undefined
="en"> <head(property) JSX.HTMLElementTags.head: JSX.HTMLAttributes<HTMLHeadElement>
> <meta(property) JSX.HTMLElementTags.meta: JSX.MetaHTMLAttributes<HTMLMetaElement>
charset(property) JSX.MetaHTMLAttributes<HTMLMetaElement>.charset?: string | undefined
="utf-8" /> <meta(property) JSX.HTMLElementTags.meta: JSX.MetaHTMLAttributes<HTMLMetaElement>
name(property) JSX.MetaHTMLAttributes<HTMLMetaElement>.name?: string | undefined
="viewport" content(property) JSX.MetaHTMLAttributes<HTMLMetaElement>.content?: string | undefined
="width=device-width, initial-scale=1" /> <link(property) JSX.HTMLElementTags.link: JSX.LinkHTMLAttributes<HTMLLinkElement>
rel(property) JSX.LinkHTMLAttributes<HTMLLinkElement>.rel?: string | undefined
="icon" href(property) JSX.LinkHTMLAttributes<HTMLLinkElement>.href?: string | undefined
="/favicon.ico" /> {assets(parameter) assets: JSX.Element
} </head(property) JSX.HTMLElementTags.head: JSX.HTMLAttributes<HTMLHeadElement>
> <body(property) JSX.HTMLElementTags.body: JSX.HTMLAttributes<HTMLBodyElement>
> <div(property) JSX.HTMLElementTags.div: JSX.HTMLAttributes<HTMLDivElement>
id(property) JSX.HTMLAttributes<HTMLDivElement>.id?: string | undefined
="app">{children(parameter) children: JSX.Element
}</div(property) JSX.HTMLElementTags.div: JSX.HTMLAttributes<HTMLDivElement>
> {scripts(parameter) scripts: JSX.Element
} </body(property) JSX.HTMLElementTags.body: JSX.HTMLAttributes<HTMLBodyElement>
> </html(property) JSX.HTMLElementTags.html: JSX.HTMLAttributes<HTMLHtmlElement>
> )}
/>
));
This file does one thing. It starts your SolidStart application on the server. It does so by passing in our <StartServer>
to a "render" function. <StartServer>
takes a document component which will serve as the static document for your application.
This calls the underlying Solid render function, and passes the options to it.
Component that wraps our application root.