docs: add snippet for base option (#7384)

This commit is contained in:
Emanuele Stoppa 2023-06-21 13:06:43 +01:00 committed by GitHub
parent 3943fa390a
commit 61d6e45cef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,10 @@ import express from 'express';
import { handler as ssrHandler } from './dist/server/entry.mjs';
const app = express();
app.use(express.static('dist/client/'))
// Change this based on your astro.config.mjs, `base` option.
// They should match. The default value is "/".
const base = "/";
app.use(base, express.static('dist/client/'))
app.use(ssrHandler);
app.listen(8080);