File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import crypto from 'crypto'
2- import { createRequestHandler } from '@react-router/express'
32import { ip as ipAddress } from 'address'
43import chalk from 'chalk'
54import closeWithGrace from 'close-with-grace'
@@ -217,18 +216,8 @@ if (IS_DEV) {
217216 // Everything else (like favicon.ico) is cached for an hour. You may want to be
218217 // more aggressive with this caching.
219218 app . use ( express . static ( 'build/client' , { maxAge : '1h' } ) )
220- const build = await import ( BUILD_PATH )
221- app . all (
222- / .* / ,
223- createRequestHandler ( {
224- mode : MODE ,
225- build,
226- getLoadContext : ( _req , res ) => ( {
227- cspNonce : res . locals . cspNonce ,
228- serverBuild : build ,
229- } ) ,
230- } ) ,
231- )
219+ const buildModule = await import ( BUILD_PATH )
220+ app . use ( buildModule . app )
232221}
233222
234223const desiredPort = Number ( process . env . PORT || 3000 )
You can’t perform that action at this time.
0 commit comments