1.5 KiB
Dev Server Setup
-
Install Bun if you haven't already
Bun is a fast JavaScript runtime, which we prefer over
npm
. These instructions will be written for Bun, but could be adapted tonpm
oryarn
if needed.curl -fsSL https://bun.sh/install | bash
-
Clone the repo
git clone https://git.pontusmail.org/librecloud/web.git cd web
-
Install dependencies
bun install
-
Generate auth secret
This step is relatively painless. Execute the below command to generate a
.env.local
file with anAUTH_SECRET
.bunx auth secret
-
Generate Altcha token
If you plan to use the signup forms, you will need to use Altcha, a private proof-of-work CAPTCHA. All you need to do is execute the script below, and it will be written to your
.env
or.env.local
.$ bun tools/hmac.ts Successfully wrote ALTCHA_SECRETKEY to .env.local
-
Configure environment variables
Following the environment variables section of this README, update your newly created
.env.local
file with your configuration. -
Initialize Prisma
Because
web
uses a database for storing Git link statuses (and other things to come), you will need to initialize the SQLite database.A
schema.prisma
file has been provided to make this easy.This can be done by executing:
bunx prisma migrate dev --name init
-
Start dev server
bun dev