Skip to content

A repo with sample Functions projects you can clone and use

Notifications You must be signed in to change notification settings

quiknode-labs/awesome-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Awesome Functions

Welcome to the Awesome Functions! This repository is designed to help you get started with our Functions serverless computing platform / edge functions, providing you with boilerplate code samples in Python and NodeJS.

These samples are tailored to assist you in integrating real-time and historic blockchain data into your applications efficiently.

Getting Started

Follow these steps to get started with Awesome Functions 👇

Prerequisites

  • Ensure you have Node.js and Python installed on your machine. You can download them from Node.js and Python respectively.
  • A QuickNode account with access to the Functions product.

Installation

  1. Clone the Repository:

    git clone https://github.com/yourorganization/awesome-functions.git
    cd awesome-functions
  2. Install Dependencies:

    For Node.js projects:

    npm install

    For Python projects:

    pip install -r requirements.txt
  3. Setting Up Your Environment: Set up environment variables (such as .env) or configuration files with your API keys and other sensitive information. Never hard code your credentials in your scripts.

Deployment

NodeJS: Single Script

TBD

NodeJS: ZIP Archive

To package your NodeJS project (qn-token-metadata-parser) into a ZIP archive with all dependencies included, follow these steps:

  1. Navigate to your project directory:

    cd qn-token-metadata-parser
  2. Install project dependencies: Ensure that you have npm installed on your system. Run the following command to install dependencies:

    npm install
  3. Modify the .env file: Create or update your .env file with the QuickNode endpoint URL. You can obtain an endpoint from QuickNode by visiting QuickNode dashboard. Replace XXX with your actual QuickNode endpoint URL:

    # Replace 'XXX' with your actual QuickNode URL
    QUICKNODE_URL="XXX"
    
  4. Build the project: This step compiles your JavaScript files using Webpack and outputs the built files in the dist directory, and creates a ZIP package with .env and JS files ready to be used in Functions. Execute the following command:

    npm run build

Python: Single Script

TBD

Python: ZIP Archive

TBD

Testing

TBD

Documentation

For detailed documentation on all the functions and configurations available, please visit our documentation page.

Support

If you encounter any issues or have questions, please file an issue in this repository or contact our support team at [email protected].

About

A repo with sample Functions projects you can clone and use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published