Skip to content

Commit 330f7d9

Browse files
differentiate title and ports for examples
1 parent 2de67e7 commit 330f7d9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ssg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ for (const entry of entries.filter(entry => entry.endsWith('.js'))) {
3737
<!DOCTYPE html>
3838
<html>
3939
<head>
40-
<title>WCC</title>
40+
<title>WCC - SSG</title>
4141
4242
${
4343
eagerJs.map(script => {

ssr.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import fastifyStatic from 'fastify-static';
33
import { renderToString } from './lib/wcc.js';
44

55
const app = fastify({ logger: true });
6+
const port = 3000;
67

78
app.register(fastifyStatic, {
89
root: new URL('./www', import.meta.url).pathname,
@@ -47,7 +48,7 @@ app.get('/*', async (request, reply) => {
4748
<!DOCTYPE html>
4849
<html>
4950
<head>
50-
<title>WCC</title>
51+
<title>WCC - SSR</title>
5152
${
5253
eagerJs.map(script => {
5354
return `<script type="module" src="${script.moduleURL.pathname.replace(process.cwd(), '')}"></script>`
@@ -112,7 +113,7 @@ app.get('/*', async (request, reply) => {
112113

113114
const start = async () => {
114115
try {
115-
await app.listen(3000)
116+
await app.listen(port)
116117
} catch (err) {
117118
app.log.error(err)
118119
process.exit(1)

0 commit comments

Comments
 (0)