Setup Development Environment
How to set up a development environment locally.
Local setup
- Install a local mysql server, and make a new database
- Rename
/api/example.env
to.env
and update theMYSQL_URL
field - Rename
/ui/example.env
to.env
Start API server
Make sure golang is installed.
Some C libraries are needed to compile the API, see go-face requirements for more details. They can be installed as shown below:
# Ubuntu
sudo add-apt-repository ppa:strukturag/libheif
sudo add-apt-repository ppa:strukturag/libde265
sudo apt-get update
sudo apt-get install libdlib-dev libblas-dev libatlas-base-dev liblapack-dev libjpeg-turbo8-dev libheif-dev
# Debian
sudo apt-get install libdlib-dev libblas-dev libatlas-base-dev liblapack-dev libjpeg62-turbo-dev libheif-dev
# macOS
brew install dlib libheif
Then run the following command to start the API server:
cd ./api && go run server.go
Start UI server
Make sure node is installed. In a new terminal window run the following commands:
cd ./ui && npm start
The site can now be accessed at localhost:1234. And the graphql playground at localhost:4001