Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsukhu/nxplorerjs-mono-starter
This is a mono repo version of the nxplorerjs microservice project
https://github.com/tsukhu/nxplorerjs-mono-starter
apollo-server expressjs graphql-server jest microservices monorepo nodejs typescript
Last synced: 3 months ago
JSON representation
This is a mono repo version of the nxplorerjs microservice project
- Host: GitHub
- URL: https://github.com/tsukhu/nxplorerjs-mono-starter
- Owner: tsukhu
- License: mit
- Created: 2018-07-25T07:57:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-03T04:19:39.000Z (over 6 years ago)
- Last Synced: 2024-11-08T16:44:25.463Z (3 months ago)
- Topics: apollo-server, expressjs, graphql-server, jest, microservices, monorepo, nodejs, typescript
- Language: TypeScript
- Size: 554 KB
- Stars: 8
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nxplorerjs-mono-starter
[![Build Status](https://travis-ci.org/ERS-HCL/nxplorerjs-mono-starter.svg?branch=master)](https://travis-ci.org/ERS-HCL/nxplorerjs-mono-starter) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![DeepScan grade](https://deepscan.io/api/projects/2898/branches/21962/badge/grade.svg)](https://deepscan.io/dashboard#view=project&pid=2898&bid=21962)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)This is a mono repo version of the [nxplorer js microservice project](https://github.com/ERS-HCL/nxplorerjs-microservice-starter)
## Workspaces
- **@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.
## Setup
- Execute these commands from the root directory
### Installation
```bash
yarn bootstrap
```- Production build
```bash
yarn prepare
```- Development mode
```bash
yarn start
```- Unit Tests
```bash
yarn test
```- Integration Tests
```bash
yarn itest
```- Lint
```bash
yarn lint
```- Serve production build
- This will start 2 servers
1. The SWAPI GraphQL Server at port 4000
2. The Main Gateway Server at port 3000 . All the REST APIS and GraphQL APIs are accessible on the gateway.```bash
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.```bash
yarn release
```## Adding new dependencies to workspaces
```bash
yarn workspace add
``````bash
lerna add --scope=
```- Example of adding node-fetch to @nxp/nxp-server
```bash
yarn workspace @nxp/nxp-server add node-fetch
``````bash
lerna add node-fetch --scope=@nxp/nxp-server
```