Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 1.64 KB

File metadata and controls

81 lines (59 loc) · 1.64 KB

Windows first setup

  1. Install Powershell from WinGet. This is distinct from Windows Powershell which is included with Windows.
winget install Microsoft.PowerShell

  1. Install Scoop.

  1. Install Git, Go, PostgreSQL, and Caddy. You can omit any software you already have installed.
scoop install git go postgresql caddy

  1. Start Postgres.
postgres

  1. In a new terminal, clone and enter the Duit Git repository.
git clone https://github.com/TwirlySeal/duit.git
cd .\duit

  1. Run setup.sql to create the duit database and insert mock data.
psql -U postgres -f .\setup.sql

  1. Make a script to set the POSTGRES_URL environment 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

  1. Enter the 'server' directory and run the Go server.
cd .\server
go run .

  1. Start Caddy from the root directory in a new terminal.
caddy run

  1. Open http://localhost/1 in a browser to access the web app.

Running the project

After first setup, these are the only steps needed to run the project.

  1. Start Postgres
  2. Run the postgres_url.ps1 script
  3. Start the Go server
  4. Start Caddy
  5. Open the web app in a browser