-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'staging' of https://github.com/WaifuAPI/Waifu.it into s…
…taging
- Loading branch information
Showing
340 changed files
with
14,214 additions
and
2,273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
## Create a file name with .env, then copy this file and paste over there and fill the details. | ||
|
||
# Get the Mongodb URL from their site | ||
MONGODB_URI= | ||
# Your PORT for the API to work on | ||
PORT= | ||
# Node Environment [ production or development ], use development to log errors. | ||
NODE_ENV= | ||
# Creates Log | ||
DISCORD_WEBHOOK_URL= | ||
# Example .env file for configuring environment variables | ||
|
||
# MongoDB connection URI | ||
|
||
MONGODB_URI= # Specify the URI for MongoDB connection | ||
|
||
# Port for the server | ||
|
||
PORT= # Define the server port | ||
|
||
# Node environment ('development', 'production', etc.) | ||
|
||
NODE_ENV= # Set the Node environment | ||
|
||
# Logger configuration ('true' or 'false') | ||
|
||
LOGGER= # Enable or disable the logger | ||
|
||
# Webhook URL for chatbot logger | ||
|
||
CHATBOT_LOGGER_WEBHOOK= # Provide the URL for the chatbot logger webhook | ||
|
||
# Discord webhook URL | ||
|
||
DISCORD_WEBHOOK_URL= # Input the URL for Discord webhook | ||
|
||
# Access key for authentication | ||
|
||
ACCESS_KEY= # Assign the access key for authentication | ||
|
||
# HMAC key for generating secure tokens | ||
|
||
HMAC_KEY= # Set the HMAC key for secure token generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
ko_fi: Aeryk | ||
github: kyrea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
# Environment variables | ||
# Ignore environment variables file | ||
.env | ||
|
||
|
||
# dependencies | ||
# Ignore dependencies | ||
/node_modules | ||
|
||
# Private files | ||
# Ignore private files | ||
/private | ||
|
||
|
||
# jetbrains | ||
# JetBrains IDE files | ||
.idea/ | ||
|
||
# vscode | ||
# Visual Studio Code settings | ||
.vscode/ | ||
|
||
# Logs | ||
# Ignore log files | ||
/logs | ||
|
||
# Data Files | ||
# Ignore data files | ||
/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"useTabs": false, | ||
"tabWidth": 2, | ||
"semi": false, | ||
"trailingComma": "es5", | ||
"proseWrap": "preserve", | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
"singleQuote": true | ||
} | ||
"trailingComma": "all", | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"proseWrap": "preserve" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
## [Click here](https://github.com/WaifuAPI/Documentation) for API Documentaion. | ||
## [Click here](https://docs.waifu.it) for API Documentaion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/** | ||
* Configuration module for managing environment-specific settings. | ||
* @module config | ||
* @type {Object} | ||
*/ | ||
|
||
import dotenv from 'dotenv'; | ||
|
||
/** | ||
* Loads environment variables from a .env file into process.env. | ||
* @type {Function} | ||
*/ | ||
dotenv.config(); | ||
|
||
/** | ||
* Application configuration settings. | ||
* @type {Object} | ||
* @property {string} database - Name of the database. | ||
* @property {number} serverPort - Port for the server. | ||
* @property {string} serverHost - Host for the server. | ||
* @property {Object} roles - User roles. | ||
* @property {string} roles.DEVELOPER - Developer role. | ||
* @property {string} roles.ADMIN - Admin role. | ||
* @property {string} roles.MOD - Moderator role. | ||
* @property {string} roles.DB_MOD - Database Moderator role. | ||
* @property {string} roles.PREMIUM - Premium role. | ||
* @property {string} roles.USER - User role. | ||
*/ | ||
const config = { | ||
/** | ||
* Name of the database. | ||
* @type {string} | ||
* @default 'mydatabase' | ||
*/ | ||
database: process.env.MONGODB_URI || 'mydatabase', | ||
|
||
/** | ||
* Port for the server. | ||
* @type {number} | ||
* @default 3000 | ||
*/ | ||
serverPort: process.env.PORT || 3000, | ||
|
||
/** | ||
* Host for the server. | ||
* @type {string} | ||
* @default '127.0.0.1' | ||
*/ | ||
serverHost: process.env.HOST || 'http://localhost', | ||
|
||
/** | ||
* User roles. | ||
* @type {Object} | ||
* @property {string} DEVELOPER - Developer role. | ||
* @property {string} ADMIN - Admin role. | ||
* @property {string} MOD - Moderator role. | ||
* @property {string} DB_MOD - Database Moderator role. | ||
* @property {string} PREMIUM - Premium role. | ||
* @property {string} USER - User role. | ||
*/ | ||
roles: { | ||
DEVELOPER: 'developer', | ||
ADMIN: 'admin', | ||
MOD: 'moderator', | ||
DB_MOD: 'database_moderator', | ||
PREMIUM: 'premium', | ||
USER: 'user', | ||
}, | ||
}; | ||
|
||
/** | ||
* Global configuration object based on the current environment. | ||
* @global | ||
* @type {Object} | ||
*/ | ||
global.config = config; |
Oops, something went wrong.