Local Development
Prerequisites
- Node.js
- typescript
- Yarn or npm
- Git
- Discord server
Hardware Requirements
PBotD runs efficiently on minimal hardware. The most resource-intensive process is during the build phase, but once deployed, it operates with low overhead.
Supported Operating Systems
PBotD is compatible with a wide range of operating systems, as it only requires TypeScript execution. It works well on Windows, Mac, Linux, and BSD. For production environments, we recommend using Linux for optimal performance. Any operating system that supports Node.js should be able to run PBotD effectively. We use Prisma for database maintenance.
To ensure optimal performance and compatibility, we highly recommend using Node.js version 18 for your development environment. This version provides the best balance of stability, features, and security for this project. Please make sure to update your Node.js installation if necessary.
Setup
- Clone the repository:
git clone https://github.com/discord-bot-points/Points-Discord.git
- Navigate to the project directory:
cd Points-Discord
- Install dependencies:
npm install
-
Rename dotenv (.env) file:
Rename the file .env.exemple to .env file that includes the variables, replacing the example values with your own variables. The base seed handles the creation of 2 users and 3 domains.
If you want to create more:
- Add new variables in the .env file.
- Copy the existing variables from the .env file and paste the new variables into the config.ts file.
-
Create migrations:
npx prisma migrate dev
or
pnpm dlx prisma migrate dev
- Launch the seed for testing (optional):
pnpm run seed
- Launch the server:
npm run dev
or
pnpm run dev