The easiest way to use the AGL APIs in your node.js applications.
Objective:
- generic node js with less dependency on any package
- provide transparency about using AGL APIs and object structures used in those APIs
- easy to integrate with existing nodejs app
- easy to deploy with existing nodejs app
- gitlabs CI/CD friendly
- es5 and es6 syntax friendly
- provide scalability and security and compatibility
- versioning
=======================================================================
Dependencies:
- Docker: https://docs.docker.com/v17.09/engine/installation/linux/docker-ce/ubuntu/#install-using-the-convenience-script
- Docker Compose: https://docs.docker.com/compose/install/
How do I use it for test?
Go to one of versions under the root directory, run docker-compose up -d.
Open your browser, type http://localhost:3000, you should be able to see a list of cats as required format
There are unit tests (nock) and integration tests available for the test, how to run them?
Go to one of versions under the root directory, run docker-compose exec app bash
Run npm run test to run both tests, or run npm run test-unit for unit testing, or run npm run test-integration for integration testing
Other Considerations:
- Security mechanism should be implementd for source API, signing the request on App side the reach maximium security.
- Views are implemented to display the data from source API according to requirement, it shouldn't be there for simplicity of this SDK
- Provide different implementation to suit differnt response handling method for parent application, such as callback, promise and async/await.
- Add Typescript support besides ES5, ES6.
- Add more unit tests scenarios