This is a simple project for converting static HTML and web links into PDF files. Under the hood it utilises go
for
backend services, Vue.js
for frontend services, and Headless Chromium
for the HTML-to-PDF process. This repository
contains the main parts (directories): frontend
(user interface), api
(backend that the frontend will be
communicating), and daemon
(for processing long-running background jobs).
To run this project we need to have golang
and nodejs
(yarn 1
) installed.
Under the rood directory of the project run the following commands:
go build -o ./api/app ./api
go build -o ./daemon/app ./daemon
docker network create torrens
docker compose up -d
- Check
docker ps
to ensure that five containers are up and running (app
,daemon
,db
,chromiun
,smtp
) docker exec -it db sh
and runmysql -u $MYSQL_USER -p"$MYSQL_PASSWORD" -D $MYSQL_DATABASE < /opt/db.sql
inside the container- Check that http://localhost:8080/v1/user/balance returns message
not authorized
Under the rood directory of the project run the following commands:
cd frontend
yarn install
yarn serve
- Navigate to http://localhost:8081 to ensure that frontend is working
- Navigate to http://localhost:8025 to receive an email upon registration
Shutdown
- Terminate
yarn serve
by pressing `Ctrl+C - Under the rood directory of the project run
docker-compose down