Skip to content
/ Apollo Public template

Monorepo Setup with React, Express, Typescript, and MongoDB

License

Notifications You must be signed in to change notification settings

johancc/Apollo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lerna TypeScript Template

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.

Setup

You will need lerna and yarn to use this monorepo. After installing them,

  1. Install the dependencies:
    foo@bar:~$ yarn
  2. Compile the packages
    foo@bar:~$ lerna run build
  3. Start the server and webpack hotloader
    foo@bar:~$ lerna run start --stream
  4. 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

About

Monorepo Setup with React, Express, Typescript, and MongoDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages