Matrix/Webserver/README.md
2024-01-11 13:18:48 +01:00

39 lines
1.1 KiB
Markdown

## About
This is a Webserver to host a Website on the same machine as the Matrix API. This allows users to access its functions and developers to implement new features and interfaces such as games as demos.
## Installation
1. Download repository with `git clone https://gitlab1.ptb.de/waltem01/Matrix.git`
2. Navigate to the Webserver directory with `cd Webserver/`
3. Install dependencies with `npm install`
## Development
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of the app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
## Running
1. Navigate into the production environment with `cd build/`
2. Install dependencies with `npm ci --omit dev`
3. Start the production server with `node .`
## Note
If the Matrix API is executed on a separate device, although this has been explicitly advised against, you will need to point the Webserver to it by setting the environment variables shown in [`.env.example`](.env.example).