This is a mono repo version of the nxplorer js microservice project
- @nxp/nxp-core (Core Platform)
- The platform module which does all the configuration and setup of the server express server and GraphQL server
- It also configures the platform components like logging, monitoring, security , IOC container
- @nxp/nxp-swapi-server (Application - SWAPI GraphQL Server)
- This depends on @nxp/nxp-core for all the platform requirements
- Sets up the SWAPI GraphQL business API implementation
- @nxp/nxp-server (Application - API Gateway/REST/GraphQL server)
- This depends on @nxp/nxp-core for all the platform requirements
- Sets up the REST APIS, Application Services and GraphQL business API implementation
- This graphql server has a local and remote schema (nxp-swapi-server) stitched together.
- Execute these commands from the root directory
yarn bootstrap
- Production build
yarn prepare
- Development mode
yarn start
- Unit Tests
yarn test
- Integration Tests
yarn itest
- Lint
yarn lint
- Serve production build
- This will start 2 servers
- The SWAPI GraphQL Server at port 4000
- The Main Gateway Server at port 3000 . All the REST APIS and GraphQL APIs are accessible on the gateway.
yarn serve
- Bump version
- You can bump the version of all packages (together) using the command below
- While it is possible to have independent versioning for individual packages. For this project we will keep all of the packages in sync as far as releases and versioning goes.
yarn release
yarn workspace <workspace name> add <package>
lerna add <package> --scope=<scope>
- Example of adding node-fetch to @nxp/nxp-server
yarn workspace @nxp/nxp-server add node-fetch
lerna add node-fetch --scope=@nxp/nxp-server