Short Answer: Personal Purpose
Long Answer: Because me (or maybe you?) want to build a monorepo/monolith project with Express and React which combines server and frontend in one repository. Of course, it's cost-effective!
The reason why it's cost-effective are:
- That's right, because it's simpler and can be deployed on Vercel for free.
- Because
BackendandFrontendonly have onenode_modules. - Because
BackendandFrontendcan share code with each other. - The irony is, because you're the both
BackendandFrontend.
-
Clone repository
$ git clone https://github.com/sutanlab/monolith-express-react.git -
Install depedencies
# with npm
$ npm install
# or with yarn
$ yarn install- Run server in development mode
$ npm run dev
# or
$ yarn dev- Build optimize production mode
$ npm run build
# or
$ yarn build- Start server in production mode
$ npm start
# or
$ yarn start - Deploy to vercel
$ npm run deploy
# or
$ yarn deployMIT
Copyright ©2021 by Sutan Gading Fadhillah Nasution