Monorepo template for a fullstack TypeScript application based on React and Express.
yarn bootstrap
installs all dependency and links the packages.
yarn build
transpiles all TypeScript files to JavaScript and bundles the frontend. The generated files are deleted using yarn clean
.
yarn backend:start
starts the backend express serve and serves the rest endpoints and frontend onlocalhost:8000
.
The setup supports both reloading code and debugging using tsc, nodemon and webpack-dev-server.
yarn watch
transpiles all TypeScript files to JavaScript and watches for changes in the source code.
backend:serve
serves the rest endpoints onlocalhost:8000
and restart the backend on file change.frontend:serve
serves the frontend using the webpack-dev-server onlocalhost:8000
and reloads the application on file change using hot module replacement.
- Lerna & yarn links packages together and shares dependencies between them using yarn workspaces.
- TypeScript transpiles TypeScript sources to JavaScript.
- nodemon serves a node application and automatically restarts it when source files change.
- webpack bundles JavaScript, HTML and CSS files for the web.
- webpack-dev-server serves a webpack application and refreshes the browser on change.
- eslint reports common mistakes and tries to fix them using predefined rules.
- prettier formats code.
- Express web framework for serving the backend.
- Ts.ED framework on top of express providing decorators for REST endpoints, dependency injection, swagger and mongodb.
- React for building frontend user interfaces.
- Restful-React provides react hooks for interacting with backends exposing REST endpoints.