Git Product home page Git Product logo

api-backend's Introduction

API BACKEND

To Use

To clone and run App you'll need Git and Node.js v.17(which comes with npm) installed on your computer. From your command line:

  1. npm install

  2. Create a config.json and paste this in:

    {
        "accessKeyId": "<ACCESS_KEY_ID>",
        "secretAccessKey": "<SECRET_ACCESS_KEY>"
    }
    

You can get these credentials from Avaer.

  1. Create a cert/ folder. Create 2 new files inside: fullchain.pem and privkey.pem. Ask Avaer for the certificates.

  2. npm run start (forever) or npm run dev (nodemon).

Technologies

The App primarily uses the following technologies


Directory Structure

**Root**
│
├─ index.js <-- This file starts the api-backend and register all major routes in itself.
├─ config.json <-- This file controls all of the environment variables in the application.

Registered Routes

Domain Route Usage
login.exokit.org _handleLogin Provides the application with the functionality to login via Discrod, Email, Twitter & Github
accounts.webaverse.com _handleAccounts Fetch accounts from redis server
ai.webaverse.com _handleAi Handle the openAI codex compiling request from the app.webaverse

Config.json

{

		"accessKeyId"			: "<AWS ID>",
		"secretAccessKey"		: "<AWS Key>",
		"infuraProjectId"		: "<infuraProjectId>",
		"infuraProjectSecret"	: "<infuraProjectSecret>",
		"discordApiToken"		: "<discordApiToken>",
		"discordClientId"		: "<discordClientId>",
		"discordClientSecret"	: "<discordClientSecret>",
		"twitterId"				: "<twitterId>",
		"twitterConsumerKey"	: "<twitterConsumerKey>",
		"twitterConsumerSecret"	: "<twitterConsumerSecret>",
		"twitterAccessToken"	: "<twitterAccessToken>",
		"twitterAccessTokenSecret": "<twitterAccessTokenSecret>",
		"ngrokToken"			: "<ngrokToken>",
		"twitterWebhookPort"	: 123456,
		"mainnetMnemonic"		: "some key",
		"rinkebyMnemonic"		: "some key",
		"polygonMnemonic"		: "some key",
		"testnetpolygonMnemonic": "some key",
		"treasuryMnemonic"		: "some key",
		"encryptionMnemonic"	: "some key",
		"infuraKey"				: "<infuraKey>",
		"polygonVigilKey"		: "<polygonVigilKey>",
		"redisKey"				: "<redisKey>",
		"devPassword"			: "<openai>",
		"openAiKey"				: "<openAiKey>"

}

Development Mode

The application uses vite to hot reload itself automatically if there are any changes to any files. To start the App in dev mode, run:

npm run dev

:::note Any changes inside the packages folder won't recompile automatically and so will require restarting the entire development server by just running again: npm run dev :::


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.