Closed SOunit closed 2 years ago
const Users = lazy(() => import("./user/pages/Users")); const NewPlace = lazy(() => import("./places/pages/NewPlace")); const UserPlaces = lazy(() => import("./places/pages/UserPlaces")); const UpdatePlace = lazy(() => import("./places/pages/UpdatePlace")); const Auth = lazy(() => import("./user/pages/Auth"));
<main> <Suspense fallback={ <div className="center"> <LoadingSpinner /> </div> } > {routes} </Suspense> </main>
heroku login
check build file in local
npx serve
npm install -g firebase-tools
https://dashboard.heroku.com/apps/max-mern-9230930/deploy/heroku-git
document done.
refs
deploy steps overview
environment variable
backend
frontend
mongo atlas setup
react lazy loading
main 2 approaches
deploy 2 separated apps
Heroku deploy
mongo atlas setup
react
serve
check build file in local
firebasetool
ref
https://dashboard.heroku.com/apps/max-mern-9230930/deploy/heroku-git