Bootstrap application using Lerna as a mono repo with yarn work-spaces. Includes a Node TS package(s) and a front-end package using React TypeScript.
You will need lerna and yarn to use this monorepo. After installing them,
- Install the dependencies:
foo@bar:~$ yarn
- Compile the packages
foo@bar:~$ lerna run build
- Start the server and webpack hotloader
foo@bar:~$ lerna run start --stream
- Use live updating on the server side (in another terminal)
foo@bar:~$ lerna run dev --stream
The frontend is setup to proxy all requests from '/api' to the server (it strips the '/api' prefix). Note that for a production build, after building the backend and frontend code, you only have to start the server:
foo@bar:~$ lerna run start --scope "@johanc/server" --stream