- Install Powershell from WinGet. This is distinct from Windows Powershell which is included with Windows.
winget install Microsoft.PowerShell- Install Scoop.
- Install Git, Go, PostgreSQL, and Caddy. You can omit any software you already have installed.
scoop install git go postgresql caddy- Start Postgres.
postgres- In a new terminal, clone and enter the Duit Git repository.
git clone https://github.com/TwirlySeal/duit.git
cd .\duit- Run
setup.sqlto create theduitdatabase and insert mock data.
psql -U postgres -f .\setup.sql- Make a script to set the
POSTGRES_URLenvironment variable.
a. Create a directory called 'scripts' in the root of the project (scripts/ is in .gitignore)
b. Add a file inside called 'postgres_url.ps1' with the following content:
$env:POSTGRES_URL = "postgres://postgres@localhost/duit"c. Run the script.
. .\scripts\postgres_url.ps1- Enter the 'server' directory and run the Go server.
cd .\server
go run .- Start Caddy from the root directory in a new terminal.
caddy run- Open
http://localhost/1in a browser to access the web app.
After first setup, these are the only steps needed to run the project.
- Start Postgres
- Run the
postgres_url.ps1script - Start the Go server
- Start Caddy
- Open the web app in a browser