File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11const express = require ( 'express' )
22const app = express ( )
33const path = require ( 'path' )
4+ const router = express . Router ( )
45
56// Serve static files
67app . use ( '/trip-dist' , express . static ( path . resolve ( __dirname , 'dist' ) ) )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import "../main.styl";
88import "@macrostrat/style-system" ;
99import { SETTINGS } from "@macrostrat-web/settings" ;
1010import { DarkModeButton } from "@macrostrat/ui-components" ;
11- import "./main.sass"
11+ import "./main.sass" ;
1212
1313export function Page ( ) {
1414 const pageContext = usePageContext ( ) ;
Original file line number Diff line number Diff line change @@ -95,6 +95,13 @@ async function startServer() {
9595 process . env . VITE_MACROSTRAT_INSTANCE
9696 ) ;
9797
98+ // Redirect from /test/:id to /test with query parameter
99+ app . get ( "/trip/:trip" , ( req , res ) => {
100+ const { trip } = req . params ;
101+ // Redirect to /test with query parameter `id`
102+ res . redirect ( `/trip?trip=${ trip } ` ) ;
103+ } ) ;
104+
98105 /**
99106 * Vike route
100107 *
You can’t perform that action at this time.
0 commit comments