🥹Backend Setup

This discuss on how to setup and run the backend

Paal Backend Documentation

Overview

The Paal Backend is a critical component of the Paal ecosystem platform, providing essential functionalities and services required for its operation.

Table of Contents

  1. Introduction

  2. Configuration Setup

  3. MongoDB Configuration

  4. Running the Backend

  5. Conclusion

Introduction

The Paal Backend serves as the backbone of the Paal ecosystem platform. This documentation provides detailed instructions on setting up and configuring the backend to ensure it runs smoothly.

Configuration Setup

Before setting up the Paal Backend, ensure the following configurations are adjusted:

Environment Variables

Set the following environment variables:

exports.BSCSCAN_KEY = ''
exports.BASESCAN_KEY = ''
exports.CRYPTO_COMPARE_API = ''
exports.COVALENT_KEY = ''
exports.CHAIN_BASE_API = ''
exports.TWITTER_BEARER_TOKEN = ''
exports.GOOGLE_CLIENT_ID = ''
exports.GOOGLE_CLIENT_SECRET = ''
exports.PORT = 4000
exports.NETWORK_RPC = {
    1:``,
    8453:``,
    56:'',
    900:''
}

Package Installation

This is a Node.js application, so install the necessary packages using npm:

npm install

MongoDB Configuration

Adjust the MongoDB connection string in the model/model.js file to point to the correct MongoDB cluster:


//Set up default mongoose connection
const mongoDB = 'mongodb+srv://<username>:<password>@<cluster>/<dbname>';

Replace <username>, <password>, <cluster>, and <dbname> with the appropriate values.

Running the Backend

To start the Paal Backend, run the following command:

npm start

This will start the backend server on the specified port.

Conclusion

The Paal Backend is now configured and ready to be deployed. Ensure all configurations are set correctly before proceeding.


Last updated