Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webaverse/api-backend
Node server hosted on AWS, mainly used for REST endpoints.
https://github.com/webaverse/api-backend
backend exokit http node rest
Last synced: about 2 months ago
JSON representation
Node server hosted on AWS, mainly used for REST endpoints.
- Host: GitHub
- URL: https://github.com/webaverse/api-backend
- Owner: webaverse
- License: mit
- Created: 2019-08-18T03:21:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T00:50:25.000Z (over 2 years ago)
- Last Synced: 2024-05-31T15:37:14.083Z (8 months ago)
- Topics: backend, exokit, http, node, rest
- Language: JavaScript
- Homepage:
- Size: 2.1 MB
- Stars: 9
- Watchers: 7
- Forks: 12
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# API BACKEND
## To Use
To clone and run App you'll need [Git](https://git-scm.com) and [Node.js](https://nodejs.org/en/download/) v.17(which comes with [npm](http://npmjs.com)) installed on your computer. From your command line:
1. `npm install`
2. Create a `config.json` and paste this in:
```
{
"accessKeyId": "",
"secretAccessKey": ""
}
```You can get these credentials from Avaer.
3. Create a `cert/` folder. Create 2 new files inside: `fullchain.pem` and `privkey.pem`. Ask Avaer for the certificates.
4. `npm run start` (forever) or `npm run dev` (nodemon).
### Technologies
The App primarily uses the following technologies
* [NodeJS](https://nodejs.org/)
---
### Directory Structure
```bash
**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
```json
{
"accessKeyId" : "",
"secretAccessKey" : "",
"infuraProjectId" : "",
"infuraProjectSecret" : "",
"discordApiToken" : "",
"discordClientId" : "",
"discordClientSecret" : "",
"twitterId" : "",
"twitterConsumerKey" : "",
"twitterConsumerSecret" : "",
"twitterAccessToken" : "",
"twitterAccessTokenSecret": "",
"ngrokToken" : "",
"twitterWebhookPort" : 123456,
"mainnetMnemonic" : "some key",
"rinkebyMnemonic" : "some key",
"polygonMnemonic" : "some key",
"testnetpolygonMnemonic": "some key",
"treasuryMnemonic" : "some key",
"encryptionMnemonic" : "some key",
"infuraKey" : "",
"polygonVigilKey" : "",
"redisKey" : "",
"devPassword" : "",
"openAiKey" : ""}
```
____
### Development ModeThe application uses vite to hot reload itself automatically if there are any changes to any files. To start the App in dev mode, run:
```bash
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`
:::---