diff --git a/package.json b/package.json index a3141bb..e805c7d 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "scripts": { "start": "astro dev", "build": "astro build", + "build:preview": "astro build && node ./src/server.mjs", "publish:patch": "npm version patch && npm publish --access public", "publish:minor": "npm version minor && npm publish --access public", "deploy": "astro build && scp -r dist ayo@ayco.io:~/cozy/" diff --git a/server.mjs b/src/server.mjs similarity index 79% rename from server.mjs rename to src/server.mjs index 8e77983..1890e3f 100644 --- a/server.mjs +++ b/src/server.mjs @@ -2,7 +2,7 @@ import Fastify from 'fastify'; import fastifyMiddie from '@fastify/middie'; import fastifyStatic from '@fastify/static'; import { fileURLToPath } from 'node:url'; -import { handler as ssrHandler } from './dist/server/entry.mjs'; +import { handler as ssrHandler } from '../dist/server/entry.mjs'; const app = Fastify({ logger: true }); @@ -13,4 +13,4 @@ await app .register(fastifyMiddie); app.use(ssrHandler); -app.listen({ port: 8080 }); \ No newline at end of file +app.listen({ port: 4321 }); \ No newline at end of file