Development
Prerequisites
- Go - for the API server
- Node.js - for the frontend
- just - to conveniently run common commands
- sh-like shell (e.g. sh, bash, busybox) - required by
just
- watchexec - to auto-reload the API server
- ExifTool - for metadata extraction
- FFmpeg - for format conversion
Scoop (Windows): scoop install busybox just exiftool watchexec
Installation
- Clone the reposh
git clone https://github.com/smilyorg/photofield.git
- Install Go dependenciessh
go get
- Install NPM packagessh
cd ui npm install
Running
Run both the API server and the UI server in separate terminals. They are set up to work with each other by default with the API server running at port 8080
and the UI server on port 3000
.
just
is just as defined in the prerequisites.
Run the API and watch for changes
shjust watch
Run the UI server in a separate terminal and watch for changes
shcd ui npm run dev