Skip to content

pkd2210/New-CDN

Repository files navigation

Basically, there are no good all-in-one CDNs, so I built this.

Stack

The application is built mostly with:

  • Framework: Svelte + SvelteKit
  • DB: Drizzle & Postgress

Setup

  1. Install dependencies
npm install
  1. Configure .env
BETTER_AUTH_SECRET=replace-with-a-long-random-secret
BETTER_AUTH_URL=http://localhost:3000

DATABASE_URL=postgres://root:mysecretpassword@localhost:5432/local
ORIGIN=http://localhost:5173

OG_ADMIN_NAME=Your Name
OG_ADMIN_EMAIL=you@example.com
OG_ADMIN_PASSWORD=replace-with-a-strong-password
  1. Start Postgres
npm run db:start
  1. Push schema
npm run db:push
  1. Start app
npm run dev

Useful Commands

npm run dev
npm run build
npm run preview
npm run db:start
npm run db:push
npm run db:generate
npm run db:migrate
npm run db:studio
npm run auth:schema

How it works

The cdn works by taking your file, converting it to binary, and saving it in the database, Once the file is requested, we just query the database, and serve you the file, It works fast and reliably thanks to using postgress and svelte

About

Decided there is not a good enough all in one cdn solution.... So i'm building it myself!

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors