Separate bot and API server .env files. Add example .env files.
This commit is contained in:
parent
0c00c5355f
commit
2a10837194
5 changed files with 18 additions and 2 deletions
9
api.env.example
Normal file
9
api.env.example
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
PORT=
|
||||||
|
CLIENT_ID=
|
||||||
|
CLIENT_SECRET=
|
||||||
|
OAUTH_CALLBACK_URL=
|
||||||
|
DASHBOARD_URL=
|
||||||
|
DB_HOST=
|
||||||
|
DB_USER=
|
||||||
|
DB_PASSWORD=
|
||||||
|
DB_DATABASE=
|
5
bot.env.example
Normal file
5
bot.env.example
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
TOKEN=
|
||||||
|
DB_HOST=
|
||||||
|
DB_USER=
|
||||||
|
DB_PASSWORD=
|
||||||
|
DB_DATABASE=
|
1
dashboard/.env.example
Normal file
1
dashboard/.env.example
Normal file
|
@ -0,0 +1 @@
|
||||||
|
API_URL=
|
|
@ -1,6 +1,6 @@
|
||||||
import { error, notFound } from "./responses";
|
import { error, notFound } from "./responses";
|
||||||
|
|
||||||
require("dotenv").config();
|
require("dotenv").config({ path: path.resolve(__dirname, "..", "..", "api.env") });
|
||||||
|
|
||||||
import express from "express";
|
import express from "express";
|
||||||
import cors from "cors";
|
import cors from "cors";
|
||||||
|
@ -8,6 +8,7 @@ import { initAuth } from "./auth";
|
||||||
import { initGuildsAPI } from "./guilds";
|
import { initGuildsAPI } from "./guilds";
|
||||||
import { initArchives } from "./archives";
|
import { initArchives } from "./archives";
|
||||||
import { connect } from "../data/db";
|
import { connect } from "../data/db";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
console.log("Connecting to database...");
|
console.log("Connecting to database...");
|
||||||
connect().then(() => {
|
connect().then(() => {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import DiscordHTTPError from "eris/lib/errors/DiscordHTTPError"; // tslint:disab
|
||||||
|
|
||||||
import { Configs } from "./data/Configs";
|
import { Configs } from "./data/Configs";
|
||||||
|
|
||||||
require("dotenv").config();
|
require("dotenv").config({ path: path.resolve(__dirname, "..", "bot.env") });
|
||||||
|
|
||||||
// Error handling
|
// Error handling
|
||||||
let recentPluginErrors = 0;
|
let recentPluginErrors = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue