Matrix/Webserver
2024-04-09 09:42:10 +02:00
..
src optional import in API_STRING 2024-04-09 09:42:10 +02:00
static /static README 2023-12-01 07:34:12 +01:00
.env.example separate project-wide and local variables 2024-03-13 11:54:23 +01:00
.eslintignore initialize sveltekit webserver 2023-11-23 13:22:59 +01:00
.eslintrc.cjs initialize sveltekit webserver 2023-11-23 13:22:59 +01:00
.gitignore global ignore .env 2024-03-13 11:53:59 +01:00
.npmrc initialize sveltekit webserver 2023-11-23 13:22:59 +01:00
.prettierignore initialize sveltekit webserver 2023-11-23 13:22:59 +01:00
.prettierrc initialize sveltekit webserver 2023-11-23 13:22:59 +01:00
package-lock.json remove unused package 2024-03-15 09:17:14 +01:00
package.json removed flag to open browser tab on start 2024-03-15 09:17:27 +01:00
playwright.config.ts moved and renamed playwright tests 2023-11-23 13:24:38 +01:00
postcss.config.js installed tailwindcss 2023-11-24 07:07:09 +01:00
README.md nodejs/npm installation instruction 2024-04-04 15:25:11 +02:00
svelte.config.js import additional parent environment variables 2024-03-13 11:52:25 +01:00
tailwind.config.js relocating into library files, overlay and hover effect and scaling 2023-11-30 08:37:31 +01:00
tsconfig.json refactor: auto format 2024-03-14 15:25:46 +01:00
vite.config.ts refactor: auto format 2024-03-14 15:25:46 +01:00

About

This is a Webserver to host a Website on the same machine as the Matrix API. It allows users to access the functions provided by the API and developers to implement new features and interfaces such as games as demos.

Prerequisites

Download and install the LTS release of NodeJS and NPM.

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

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:

npm run build

You can preview the production build with npm run preview.

Running

  1. After finishing the build process:
  2. Navigate into the production environment with cd build/
  3. Install dependencies with npm ci --omit dev
  4. Start the production server with node .

Note

If the Matrix API is executed on a separate device, although this is explicitly advised against, you will need to point the Webserver to it by setting the optional environment variables shown in .env.example.