This is the backend for graphql frontend. This component presents a unified public interface for graphql capable clients. See the Backends For Frontends pattern for an intro to the pattern.
The following must be installed the
Run the following on your preferred command environment (command prompt, git console, any linux shell or emulator).
git clone [email protected]:CPDOne/graphql-frontend.git
cd graphql-frontend
npm install
npm start
At this point the graphql-frontend will be running accessible on http://localhost:__[configured_port]__. [configured_port] is what you have configured it to be (see configuration section below) the default is *3000.
It is necessary to update the schema.json everytime a graphql object has been modified or created. Run the script to update the schema.
npm run update-schema
npm run update-schema && npm start
To add a dependency modify the packages.json file then run:
npm install
If you have previously run npm install
and have not added any dependencies, you may simply run npm start
.
The default configuration can be seen in config.js.
If you wish to override a configuration locally set the appropriate environment variable of the same name before running the application. (See: 12 factor app config).