[ci] format
This commit is contained in:
parent
ee8dd424fd
commit
88163e02ba
5 changed files with 6 additions and 6 deletions
|
@ -47,7 +47,7 @@ export function stringifyChunk(result: SSRResult, chunk: string | RenderInstruct
|
||||||
export class HTMLParts {
|
export class HTMLParts {
|
||||||
public parts: string;
|
public parts: string;
|
||||||
constructor() {
|
constructor() {
|
||||||
this.parts = ''
|
this.parts = '';
|
||||||
}
|
}
|
||||||
append(part: string | HTMLBytes | RenderInstruction, result: SSRResult) {
|
append(part: string | HTMLBytes | RenderInstruction, result: SSRResult) {
|
||||||
if (ArrayBuffer.isView(part)) {
|
if (ArrayBuffer.isView(part)) {
|
||||||
|
|
|
@ -3,5 +3,5 @@ import nodejs from '@astrojs/node';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
output: 'server',
|
output: 'server',
|
||||||
adapter: nodejs()
|
adapter: nodejs(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,8 +2,8 @@ import http from 'http';
|
||||||
import { handler } from './dist/server/entry.mjs';
|
import { handler } from './dist/server/entry.mjs';
|
||||||
|
|
||||||
const listener = (req, res) => {
|
const listener = (req, res) => {
|
||||||
handler(req, res, err => {
|
handler(req, res, (err) => {
|
||||||
if(err) {
|
if (err) {
|
||||||
res.writeHead(500);
|
res.writeHead(500);
|
||||||
res.end(err.toString());
|
res.end(err.toString());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{ Astro.props.title }</title>
|
<title>{Astro.props.title}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -5,5 +5,5 @@ const name = 'world';
|
||||||
|
|
||||||
<Layout title={`Index page`}>
|
<Layout title={`Index page`}>
|
||||||
<h1>index page</h1>
|
<h1>index page</h1>
|
||||||
<h2>Hello { name }</h2>
|
<h2>Hello {name}</h2>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
Loading…
Reference in a new issue