Skip to content

25-To-Life/25tolife-website

Repository files navigation

Overview

This is the official website for 25 To Life: Classic built with SvelteKit.

The project uses SvelteKit with plain JavaScript and consists of:

  • SQLite database (not included)
  • SvelteKit server (Node.js)

Additional dependencies

Vite 3 server is used in development and Node.js in production - the project makes use of @sveltejs/adapter-node.

The code utilizes:

How to run

Configuration

Make sure you have Node.js installed (v16.9 or newer):

node -v

Create .env file with DATABASE_URL variable containing SQLite connection string in Prisma's format:

DATABASE_URL="file:<relative or absolute sqlite file path>"

Add LIVE_API_URL with the base URL of game's web API.

Installation

  1. Install dependencies:
npm install
  1. Generate Prisma client. Generation is needed anytime there's a change in prisma/schema.prisma.
npx prisma generate
  1. Compile SMUI SCSS themes (src/theme). Recompilation is needed anytime there's a change in .scss files.
npm run prepare

Running

Development

Start in development mode:

npm run dev

Production

  1. Build the project:
npm run build
  1. Move the .env file into build directory.

  2. Optionally preview the build:

npm run preview
  1. Start in production mode:
npm run start

About

Official 25 To Life: Classic website with player stats

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published