adalong-db-cloudfn-api

This package groups the common things to call the database API to AdAlong Back-End and to call Cloud Functions

Usage no npm install needed!

<script type="module">
  import adalongDbCloudfnApi from 'https://cdn.skypack.dev/adalong-db-cloudfn-api';
</script>

README

README

This package will help you call database API to AdAlong MongoDB through REST Calls. Also, you will be able to call our Cloud Functions.

Env Vars Needed for this package to work

DATABASE_API_PASSWORD Database SHA256 pwd.
ADALONG_API_URL AdAlong API Url (i.e: https://api-dev.adalong.com)
CLOUDFUNCTIONS_TOKEN Cloud Functions Token to log in to Google Cloud Functions
FUNCTIONS_URL Function URL (i.e: https://localhost:8888 https://us-central1-adalongpoc.cloudfunctions.net/dev)

Typing

This package is using TypeScript 3.1.4

// usecase import {call} from 'adalong-db-cloudfn-api'

call.get('name', {}).then(...)