1.0.0 • Published 4 years ago

cubo-integrations v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

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_TOKEN whose 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.git

or

git clone https://github.com/cubonetwork/cubo-integrations

After that you need to run the setup command:

npm run setup

The 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 start

Prerequisites

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 serverless

Running 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:dev

Documentation

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-docs

Deployment

This project was developed using the concepts for Serverless Architecture throught AWS Cloud. So to deploy this project you need to follow some steps:

  1. Configure your AWS credentials:
sls config credentials --provider aws --key <your_aws_access_key> --secret <your_aws_secret_key>
  1. Run script to deploy, where ${ENV} could be dev, staging or prod:
npm run deploy:${ENV}

Built With

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

See also the list of contributors who participated in this project.