This repository is a Covalent Serverless Application deployed on Google Cloud Platform. This wrapper will assist developers who want to utilize Covalent data without any server setup needed (serverless).
Cloud Functions - Service for create function to interact with Covalent API.
-
Go to Documentation
-
First of all, you need to enable the APIs.
-
To create a function, open the Functions Overview page
Remark: Make sure that the project for which you enabled Cloud Functions is selected. -
Click
CREATE FUNCTION
Button -
Enter your Cloud Function configuration
- In this example, we use
FUNCTION_NAME = covalent
- Select your region
- Select Trigger type:
HTTP
- Select Authentication:
Allow unauthenticated invocations
- Click
SAVE
Button
- In this example, we use
-
Setup Runtime environment variables
-
Open
RUNTIME, BUILD AND CONNECTIONS SETTINGS
-
Select
RUNTIME
tab -
Click
+ ADD VARIABLE
API_HOST = https://api.covalenthq.com/v1/ API_KEY = {YOUR_COVALENT_API_KEY}
-
-
Click
NEXT
Button -
Next, go to project directory
-
Install dependencies
npm install
-
Next, zip all files and folders inside project directory
-
Now come back to Google Cloud console, at Step 2: Code
- Set
Entry point = handler
- Select Source code:
ZIP Upload
- Upload
.zip
file - Select Stage bucket
- Set
-
Click
DEPLOY
Button -
After deploy project successfully, you will find
API endpoint
fromTrigger URL
inside your project at TRIGGER tab. -
How to use your API on Google Cloud Platform
GET {API endpoint}?path={COVALENT_API_PATH}¶m1=value1¶m2=value2&...