Why in the template "node-custom-server" there is server.js and server/app.ts? What can I put in the app.ts if I use SSR? #12867
-
From what I understood from the vite config, this export default defineConfig(({ isSsrBuild }) => ({
build: {
rollupOptions: isSsrBuild
? {
input: "./server/app.ts",
}
: undefined,
}
})); But why is this file needed and can other things be put into it or is it just for internal react-router use? When I used remix.js there was only a server.js file. |
Beta Was this translation helpful? Give feedback.
Answered by
brookslybrand
Jan 21, 2025
Replies: 0 comments 1 reply
-
I believe it's there just to separate the concerns of the React Router request handler from the rest of the express app. You should be able to inline it in |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MichaelDeBoey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe it's there just to separate the concerns of the React Router request handler from the rest of the express app. You should be able to inline it in
server.js
directly if you'd like