mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
28 lines
637 B
JavaScript
28 lines
637 B
JavaScript
import { createRequestListener } from '@remix-run/node-fetch-server';
|
|
import express from 'express';
|
|
|
|
import build from './dist/rsc/index.js';
|
|
|
|
const app = express();
|
|
|
|
app.use(
|
|
'/assets',
|
|
express.static('dist/client/assets', {
|
|
immutable: true,
|
|
maxAge: '1y',
|
|
}),
|
|
);
|
|
app.use(express.static('dist/client'));
|
|
|
|
app.get('/.well-known/appspecific/com.chrome.devtools.json', (_, res) => {
|
|
res.status(404);
|
|
res.end();
|
|
});
|
|
|
|
app.use(createRequestListener(build));
|
|
|
|
const PORT = Number.parseInt(process.env.PORT || '3000');
|
|
app.listen(PORT, () => {
|
|
console.log(`Server listening on port ${PORT} (http://localhost:${PORT})`);
|
|
});
|