Simple opinionated template for MERN stack with Vite and Redux Toolkit. This includes React+TypeScript with familiar configuration for vite.config.ts.
This has been created with the official Vite template (npm create vite@latest
) and some extended setup. There are two separate folders called server
and client
. The entry point for the backend is server/src/index.js
.
Thanks to awesome-vite for publishing this project.
- React
- Tailwind CSS
- TypeScript
- Redux Toolkit
- Axios
- React Router DOM
- Express
- mongoose
- bcrypt.js
- jsonwebtoken
- express-async-handler
npx degit apicgg/vite-mern-template my-app
cd my-app
cd client
npm install
cd ..
npm install
npm run watch
npm run dev
-
Run the above two commands on different terminal sessions.
-
Remove the .git folder and initialize your own git repository.
-
In this case
npm run watch
needs to be executed before starting the development server withnpm run dev
as the TypeScript files need to be compiled to JavaScript before staring the dev server with node.ts-node
can be used this to avoid this.
- Create a npm CLI library for scaffolding projects.
MIT License.
Please review the License.
Contributions of any kind welcome! Kindly have a look into Contributing Guidelines