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)
Vite 3 server is used in development and Node.js in production - the project makes use of @sveltejs/adapter-node.
The code utilizes:
- ESLint
- Prisma (ORM)
- Svelte Material UI components (Svelte components)
- svelte-carousel
- TailwindCSS (styling)
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.
- Install dependencies:
npm install
- Generate Prisma client. Generation is needed anytime there's a change in
prisma/schema.prisma.
npx prisma generate
- Compile SMUI SCSS themes (
src/theme). Recompilation is needed anytime there's a change in.scssfiles.
npm run prepare
Start in development mode:
npm run dev
- Build the project:
npm run build
-
Move the
.envfile intobuilddirectory. -
Optionally preview the build:
npm run preview
- Start in production mode:
npm run start