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
Backend
andFrontend
only have onenode_modules
. - Because
Backend
andFrontend
can share code with each other. - The irony is, because you're the both
Backend
andFrontend
.
-
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 deploy
MIT
Copyright ©2021 by Sutan Gading Fadhillah Nasution