3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Separate bot and API server .env files. Add example .env files.

This commit is contained in:
Dragory 2019-07-21 14:37:46 +03:00
parent 0c00c5355f
commit 2a10837194
5 changed files with 18 additions and 2 deletions

9
api.env.example Normal file
View 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
View file

@ -0,0 +1,5 @@
TOKEN=
DB_HOST=
DB_USER=
DB_PASSWORD=
DB_DATABASE=

1
dashboard/.env.example Normal file
View file

@ -0,0 +1 @@
API_URL=

View file

@ -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(() => {

View file

@ -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;