Added basic actor page with scenes and co-star filtering.

This commit is contained in:
2024-01-07 06:13:40 +01:00
parent ffcb77ab45
commit e32a366fff
14 changed files with 476 additions and 144 deletions

View File

@@ -20,7 +20,8 @@ import { renderPage } from 'vike/server'; // eslint-disable-line import/extensio
// import root from './root.js';
import { fetchActorsApi } from './actors.js'; // eslint-disable-line import/extensions
import { fetchScenesApi } from './scenes.js';
import { fetchActorsApi } from './actors.js';
const isProduction = process.env.NODE_ENV === 'production';
@@ -60,6 +61,8 @@ async function startServer() {
router.get('/api/actors', fetchActorsApi);
router.get('/api/scenes', fetchScenesApi);
// ...
// Other middlewares (e.g. some RPC middleware such as Telefunc)
// ...
@@ -75,6 +78,10 @@ async function startServer() {
const pageContext = await renderPage(pageContextInit);
const { httpResponse } = pageContext;
if (pageContext.errorWhileRendering) {
console.error(pageContext.errorWhileRendering);
}
if (!httpResponse) {
next();
return;