- add example env
- update readme
This commit is contained in:
parent
447cd322b5
commit
eee0f69794
10
.env.example
Normal file
10
.env.example
Normal file
@ -0,0 +1,10 @@
|
||||
# Environment variables declared in this file are automatically made available to Prisma.
|
||||
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
|
||||
|
||||
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
||||
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
||||
|
||||
DATABASE_URL="file:./dev.db"
|
||||
DISCORD_TOKEN=
|
||||
DISCORD_APPLICATION_ID=
|
||||
DISCORD_CHANNEL_ID=
|
26
README.md
26
README.md
@ -1,2 +1,28 @@
|
||||
# discord-bot
|
||||
|
||||
## Setup
|
||||
|
||||
first install [volta](https://volta.sh/)
|
||||
|
||||
(optional) install https://ngrok.com/download for opening db browser remotely
|
||||
|
||||
After installing volta and setting up an user for the bot with sudo group
|
||||
|
||||
- ```source ~/.bashrc```
|
||||
- ```volta install node```
|
||||
- ```volta install yarn```
|
||||
- ```volta install pm2```
|
||||
|
||||
In repo (after setting up .env):
|
||||
|
||||
- ```yarn install```
|
||||
- ```yarn prisma migrate dev```
|
||||
- ```pm2 start ecosystem.config.js```
|
||||
|
||||
## Commands
|
||||
|
||||
- Start the application ```yarn start```
|
||||
- Start dev ```yarn dev```
|
||||
- Start db browser ```yarn prisma studio```
|
||||
|
||||
|
||||
|
@ -2,8 +2,6 @@ export default {
|
||||
discord: {
|
||||
applicationId: process.env.DISCORD_APPLICATION_ID || "",
|
||||
channelId: process.env.DISCORD_CHANNEL_ID || "",
|
||||
guildId: process.env.DISCORD_GUILD_ID || "",
|
||||
token: process.env.DISCORD_TOKEN || "",
|
||||
secret: process.env.DISCORD_SECRET || "",
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user