2024-02-15 02:01:36 +01:00
|
|
|
# fishing-api
|
|
|
|
|
2024-03-05 23:22:24 +01:00
|
|
|
This is a rewrite of Brandon Lockaby's fishing bot for Multiplayer Piano.
|
2024-02-15 02:01:36 +01:00
|
|
|
|
2024-03-05 23:22:24 +01:00
|
|
|
This project is a complete overhaul over the original script.
|
|
|
|
|
|
|
|
This project was created using `bun init` in bun v1.0.25. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
|
2024-02-15 02:01:36 +01:00
|
|
|
|
2024-03-05 23:22:24 +01:00
|
|
|
## Deployment
|
|
|
|
|
2024-03-11 16:25:00 +01:00
|
|
|
Firstly, a PostgreSQL database must be ready beforehand to connect to with a URI. This shoud be self-explanatory to setup.
|
|
|
|
|
|
|
|
Copy the default `.env` file:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cp .env.template .env
|
|
|
|
```
|
|
|
|
|
|
|
|
Edit that file to match your environment, then install packages:
|
2024-02-15 02:01:36 +01:00
|
|
|
|
|
|
|
```bash
|
2024-03-05 23:22:24 +01:00
|
|
|
bun install
|
2024-03-11 16:25:00 +01:00
|
|
|
bunx prisma db push
|
|
|
|
```
|
|
|
|
|
|
|
|
Run both the http server and the clients for various services separately with these commands:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
bun . # Main http server
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
|
|
bun src/mpp/index.ts # MPP bot
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
|
|
bun src/discord/index.ts # Discord bot
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
|
|
bun src/cli/index.ts # Command-line client (for debugging)
|
2024-02-15 02:01:36 +01:00
|
|
|
```
|