Skip to content

Latest commit

 

History

History
86 lines (65 loc) · 1.78 KB

quickstart.mdx

File metadata and controls

86 lines (65 loc) · 1.78 KB
title description
Quickstart
Start building awesome discord bots in 5 minutes

Setup

**Prerequisite** You should have installed Node.js (version 18.10.0 or higher).

Installation

Clone the Repository

git clone https://github.com/wumpusjs/wumpus.js

Install Dependencies

npm i
pnpm i

Create a .env File

APPLICATION_ID="YOUR_APPLICATION_ID"
TOKEN="YOUR_BOT_TOKEN"
DATABASE_HOST="YOUR_HOST_ADRESS_OR_IP"
DATABASE_PORT="YOUR_DB_PORT"
DATABASE_USER="YOUR_DB_USER"
DATABASE_PASSWORD="YOUR_DB_PASSWORD"
DATABASE_NAME="YOUR_DB_NAME"
ENVIRONMENT="development"
The `ENVIRONMENT` variable should be set to `development` for local development. The `ENVIRONMENT` doesnt support any other value than `development` for now. Because of the current state of the project, it is not recommended to use the `production` value. This project uses PostgreSQL as the database. Other databases are not supported at the moment.

Building the Project

tsc -p tsconfig.json
The project uses TypeScript. You need to compile every time the TypeScript files to JavaScript before running the project. You need to download the TypeScript compiler if you haven't already. You can do this by running `npm i -g typescript`.

Running the Project

node dist/index.js

Using PM2 (for production)

pm2 start dist/index.js --name wumpus-client
You need to download the PM2 process manager for this command if you haven't already . You can do this by running `npm i -g pm2`.

Now you are ready to start building your Discord bot with Wumpus.js! 🚀