-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directory for shared code between client and server #104
Comments
And also if you have 5 minutes, could you please explain, why are we returning TypeScript-MERN-Starter/client/core/src/shared/fetch.ts Lines 60 to 66 in 33bd731
|
Hi @hamboomger , intuitively we would like to create a |
@hamboomger , because for any unhandlable routes the server responds the index.html directly, this means server leave any routes it cannot process to the client. if (contentType && contentType.startsWith(RESPONSE_CONTENT_TYPE.HTML) && response.request.responseURL) { This means the case that server has the redirected url which it cannot handled happens, so client should take over the redirect action. Usually this case happens in OAuth2 interaction. |
By the way, I also would like to create a |
@shanhuiyang oh okay, now it makes sense to me. Thank you for reply :) |
Hi, loving your project so much, it really helps me to get into full stack development much easier.
I have a question about project structure, it seems like the common part for both frontend and backend is inside the
client/core/src/models
directory, could you please explain why did you choose this approach instead of having a separatecommon
module in the project root directory?The text was updated successfully, but these errors were encountered: