2023-09-12 07:59:54 +02:00
|
|
|
![MPP](https://github.com/multiplayerpiano/mpp-frontend-v1/blob/master/static/128-piano.png?raw=true)
|
|
|
|
|
2023-09-08 03:19:13 +02:00
|
|
|
# mpp-server-dev2
|
2021-03-20 20:16:59 +01:00
|
|
|
|
2023-09-08 03:19:13 +02:00
|
|
|
This is a new MPP server currently in development for [MPP.dev](https://www.multiplayerpiano.dev). The original server is old and it needs a new one.
|
2023-09-09 11:27:16 +02:00
|
|
|
|
|
|
|
This server uses Bun.
|
|
|
|
|
|
|
|
The commit history includes BopItFreak's server because this server is (debatably) a heavy reimplementation of my fork of it.
|
|
|
|
|
|
|
|
## How to run
|
|
|
|
|
|
|
|
0. Install bun
|
|
|
|
|
|
|
|
```
|
|
|
|
$ curl -fsSL https://bun.sh/install | bash
|
|
|
|
```
|
|
|
|
|
2023-09-11 06:52:03 +02:00
|
|
|
1. Setup Git submodules
|
|
|
|
|
|
|
|
```
|
2023-09-11 06:57:20 +02:00
|
|
|
$ git submodule update --init --recursive
|
2023-09-11 06:52:03 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
2. Configure
|
2023-09-09 11:27:16 +02:00
|
|
|
|
|
|
|
- Copy environment variables
|
|
|
|
|
|
|
|
```
|
|
|
|
$ cp .env.template .env
|
|
|
|
```
|
|
|
|
|
|
|
|
Edit `.env` to your needs.
|
|
|
|
|
|
|
|
- Edit the files in the `config` folder to match your needs
|
|
|
|
|
2023-09-11 06:52:03 +02:00
|
|
|
3. Install packages
|
2023-09-09 11:27:16 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
$ bun i
|
|
|
|
```
|
|
|
|
|
2023-09-11 06:52:03 +02:00
|
|
|
4. Setup database
|
2023-09-09 11:27:16 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
$ bunx prisma generate
|
|
|
|
$ bunx prisma db push
|
|
|
|
```
|
|
|
|
|
2023-09-11 06:52:03 +02:00
|
|
|
5. Build
|
2023-09-09 11:27:16 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
$ bun run build
|
|
|
|
```
|
|
|
|
|
2023-09-11 06:52:03 +02:00
|
|
|
6. Run
|
2023-09-09 11:27:16 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
$ bun start
|
|
|
|
```
|
2023-09-09 11:29:26 +02:00
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
```
|
|
|
|
$ bun dev
|
|
|
|
```
|