This is a template for a monorepository that uses best practices for TypeScript, Web Services and React.
It is what @bhouston considers best practice in June 2023.
(Aside, it is ridiculous that this installs +1000 packages, but it is what it is.)
- Mono-repository using NPM workspaces
- TypeScript for type safety
- ES Modules for fast builds
- NodeNext node resolution
- React for UI
- Both react and vanilla JS libraries
- Command line, React app, and web server
- Vite for Bundling, CSS Handling, Live Reloading.
- Hot reload of React
- Auto service restart for the web server
- Lerna for managing the monorepo dependencies in parallel builds
- Prettier for code formatting
- ESLint for linting
- Incremental typescript builds for fast updates
- VSCode will auto-format on save and paste.
- Jest testing
- NX build caching
- Clone this repository
- Run
npm install
- Run
npm run test
to run all jest tests
- Run
npm run dev
to start the hot reload development server & build watchers
- Run
npn run start
to start the webserver in auto-reload mode - Open
http://localhost:8000
in your browser
- Run
npm run build
to build the source
- Run
npx koa-server
to start the webserver - Open
http://localhost:8000
in your browser
- Run
npx cmdline-app
to run the CLI example