Skip to content

Simple production ready boilerplate for MERN stack with Vite.

License

Notifications You must be signed in to change notification settings

AccessiTech/vite-mern-template

 
 

Repository files navigation

vite-mern-template

Depfu Depfu

Simple opinionated boilerplate for MERN stack with Vite and Redux Toolkit. This includes React+TypeScript with familiar configuration for vite.config.ts for front-end and Express+TypeScript for back-end.

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.

Tools

The dependency versions are managed by depfu.

Demo

vite-mern-template-gh-demo

Installation

npx degit apicgg/vite-mern-template my-app

Install dependencies

cd my-app
cd client
npm install
cd ..
npm install

Start the development server

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 with npm 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.

TODO

  • Include testing frameworks, eslint and prettier.
  • Create a npm CLI library for scaffolding projects.

License

MIT License.

Please review the License.

Contributors ✨

Contributions of any kind welcome! Kindly have a look into Contributing Guidelines

About

Simple production ready boilerplate for MERN stack with Vite.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 53.0%
  • HTML 25.3%
  • JavaScript 17.6%
  • CSS 4.1%