@evdy-consumer/cloudcms-api-proxy
v2.12.1
Published
Proxy for using the CloudCMS API
Downloads
233
Readme
cloudcms-api-proxy
A proxy to the CloudCMS API, handling caching via Redis and giving us the ability to create custom endpoints that interact with the CloudCMS API
Setup
Install lerna globally if you haven't already:
npm install -g lerna
Copy
env-template
to.env
Populate the variables within
.env
with the needed values
Important things to be aware of...
Currently we're using graphql-combine-query
for combining queries when batching queries to send to CloudCMS. This package is pretty new and doesn't have wide adoption yet, so we should keep tabs on it... I (kzusy) performed an audit before adding and didn't see anything suspect. It only has one dependency, which is graphql: ^15.1.0
, and that matches the version that we are using.
Running
Start your local redis server (assuming you installed via wsl):
sudo service redis-server start
Install dependencies:
lerna bootstrap
To transpile the source, start the service and watch for any changes:
npm run watch
NOTE: At the time of writing this there is an occasional issue with the
watch
script. If you run into that, you can run thebuild
andrun
scripts. Alternatively, and preferably, you can fix thewatch
issue :trollface:
Watch additional packages within the lerna repo and restart
- To trigger a restart of cloudcms-api-proxy when changes are made within other packages within this lerna repo, add it's
lib/
ordist/
directory to the "watch" array withinnodemon.json
. Then runlerna run watch
Make updates
- Updates should be made within the src directory.
- Ensure that your changes do not introduce any linting errors or warnings
- Changes to the linting rules should be discussed with the team
- Ensure that unit tests are passing
- Add unit tests for new or uncovered functionality
- Update unit tests for changes made as needed