Full Stack Packages
Fullstack packages to develop and test end to end; to use as packages or work independently.
The idea is to create modules for each package so it can work independently as well as integrated to another project as packages.
||- removes the node_modules directory from all packages.|
||- starts the web server and backend server. Or Use
||- starts the web server and backend server in watch mode.|
||- starts the web server and backend server in debug and watch mode.|
||- build the packages in watchmode (Useful for development)|
||- install external dependencies at the repo root so they're|
||- build all the packages|
||- publishes packages in the current Lerna project.|
lerna.json for creating the packages structure. Under packages you can create different modules based on its usage. For example:
packages - Has the packages to organize the codebase into multi-package repositories. sample-core - Core interfaces of the packages which can be shared between server and client. sample-server-core - Core interfaces and its implementation code for Server. sample-client-state - Client State related code which consists of Redux and Graphql Gql sample-client-react - React pure components and containers are defined. sample-graphql-schema - Graphql Schema for Server. servers - Has the packages to organize the codebase into multi-package repositories. frontend-server - Frontend Client Server. This is useful to show demo of this package. backend-server - Backend apollo server.
If you want to develop FullStack locally you must follow the following instructions:
- Clone fullstack-pro locally
git clone https://github.com/cdmbase/fullstack-pro cd fullstack-pro
- Install dependencies and build packages.
npm install && npm run build
- Setup environment file
cp ./config/development/dev.env.sample ./config/development/dev.env
- Seed development database data (not needed if it is not setup)
npm run db:seed
- Start both client and server together
The graphql server endpoints are
The browser server endopoint is
To run build with watch. Useful for auto reloading changes into the server to be productive during development.
npm run watch
Server Side Rendering
Useful to run Frontend and Backend in two seperate servers.
to start frontend server
cd frontend-server npm run build npm start
to start backend server
cd backend-server npm run db:seed npm run build npm start
Prior to it you need to run
npm install from root directory.
Build three docker images by following the steps:
- Frontend Server
cd frontend-server npm run docker:build
- Backend Server
cd backend-server npm run docker:build
cd hemera-server npm run docker:build
Environment settings for non-development
GRAPHQL_URL CLIENT_URL NATS_URL NATS_USER NATS_PW
To troubleshoot webpack configuration run
npm run zen:watch:debug