Installation

How to use Hyper AL-1S in your machine.

Prepare

Install Powershell 7

Winget
winget install Microsoft.Powershell

Manual Install

Install Bun

Winget
ps1
winget install oven-sh.bun

Get Hyper AL-1S

Clone Git Repository
Download ZIP with Powershell
git clone https://github.com/imnyang/hyper-al-1s.git

Chnage Directory

Powershell
cd hyper-al-1s
cd backend

Setup .env

Powershell
if (!(Test-Path .env) -and (Test-Path .env.example)) { 
    Copy-Item .env.example .env 
}

$SECRET = (bun --eval "console.log(require('crypto').randomBytes(32).toString('hex'))")

if ((Get-Content .env) -match "^JWT_SECRET=") { 
    (Get-Content .env) -replace "^JWT_SECRET=.*", "JWT_SECRET=$SECRET" | Set-Content .env 
} else { 
    "JWT_SECRET=$SECRET" | Add-Content .env 
}
)

Install Dependencies

Bun
bun install

Build Server

Bun
bun run build

Start Server

Powershell
.\server.exe

Development Server

Bun
bun run dev