cubo-integrations v1.0.0
cubo-integrations
This repository was created to be the Cubo Integrations backend service.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
This project has some private dependencies, so its necessary to login to npm registry before run the following commands. To do this, please configure an environment variable called
NPM_TOKENwhose value must be a valid npm Auth Token for cubo.network registry.
First of all you need to clone this repository in your machine:
git clone git@github.com:cubonetwork/cubo-integrations.gitor
git clone https://github.com/cubonetwork/cubo-integrationsAfter that you need to run the setup command:
npm run setupThe command above will prompt you to login on @cubo.network npm repository. Check with administrators to get the credentials.
And finally you are ready to run and test the project in development environment. For this run the following command:
npm startPrerequisites
This project have been developed using Serverless Architecture and to help us to deploy and operating the resources in to the Cloud we decided to use Serverless Framework. For use of Serverless Framework we need to install serverless cli running the following command:
npm install -g serverlessRunning the tests
Unit tests
Integration tests
Testing endpoints with authorizer
If you need to make tests on API Gateway endpoints with authorizer you need to authenticate and generate a firebase token and send it into Request's Authorization header. You could generate a token for dev porpouses using:
npm run gen-firebase-token:devDocumentation
We are using JSDoc with docdash template for document our code. To generate documentation html files run the command above (The html files will be created at ./docs/dist folder).
npm run generate-docsDeployment
This project was developed using the concepts for Serverless Architecture throught AWS Cloud. So to deploy this project you need to follow some steps:
- Configure your AWS credentials:
sls config credentials --provider aws --key <your_aws_access_key> --secret <your_aws_secret_key>- Run script to deploy, where ${ENV} could be
dev,stagingorprod:
npm run deploy:${ENV}Built With
- Serverless Framework - The toolkit for deploying and operating serverless architectures.
- Jest - Tests library
Contributing
If you'd like to contribute with this repository, please, read the instructions below to understand how this project is structured.
Versioning
We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.
Authors
- Cubo Devs - devs@cubo.network
See also the list of contributors who participated in this project.
6 years ago