author BounceCode, Inc.
 *  packageDocumentation import * as url from 'url' ; import next from 'next' ; import createExpressApp from './express' ; author BounceCode, Inc.
  const dev = process . env . NODE_ENV === 'development' ; author BounceCode, Inc.
  const app = next ( { dev } ) ; const handle = app . getRequestHandler ( ) ; /**
 * Next.js 를  expressApp 으로 실행합니다.
 *
 *  author BounceCode, Inc.
  const nextApp = async ( ) => { await app . prepare ( ) ; const expressApp = await createExpressApp ( ) ; expressApp . get ( '*' , ( req , res ) => { let parsedUrl = url . parse ( req . url , true ) ; const pathname = parsedUrl . pathname ; if ( pathname !== '/' && pathname ?. endsWith ( '/' ) && parsedUrl . pathname ) { parsedUrl = url . parse ( parsedUrl . pathname . slice ( 0 , - 1 ) , true ) ; } return handle ( req , res , parsedUrl ) ; } ) ; return expressApp ; } ; export default nextApp ;