alexswensen.io Svelte Themes

Alexswensen.io

My personal website and blog! Written in SvelteKit

alexswensen.io

This is the source code for my personal website, alexswensen.io. It is built using SvelteKit. I may also change it to Astro, but I'm not sure yet. We shall see...

Development

Just a quick note to get started, the default password for most of this project is L3tM3In!.

This is intentional for easy local development and pull requests.

An easy way to remember is to think of the phrase "Let me in!" but with the e replaced with 3.

Prerequisites

  • Node.js (v20 or later)
  • pnpm (v8 or later)
  • Docker (v25 or later) - Docker Desktop v4.28+ is also acceptable

Getting started

  1. Clone the repository

  2. Install the dependencies

    pnpm install
    
  3. Copy the .env.example file to .env and fill in the necessary environment variables

    cp .env.example .env
    
  4. Start the development server

    docker compose up -d
    #TODO(@AlexSwensen): seed the database once the database is a thing...
       
    pnpm run dev
    

Shutting down the development server

When you're done working on the project, you can shut down the development server with the following command:

docker compose down

create-svelte

Everything you need to build a Svelte project, powered by create-svelte.

Creating a project

If you're seeing this, you've probably already done this step. Congrats!

# create a new project in the current directory
pnpm create svelte@latest

# create a new project in my-app
pnpm create svelte@latest my-app

Developing

Once you've created a project and installed dependencies with pnpm install (or pnpm install or yarn), start a development server:

pnpm run dev

# or start the server and open the app in a new browser tab
pnpm run dev -- --open

Building

To create a production version of your app:

pnpm run build

You can preview the production build with pnpm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Top categories

Loading Svelte Themes