https://github.com/nico-i/profile-card-gen
A simple HTTP server to generate profile cards via a multipart-form.
https://github.com/nico-i/profile-card-gen
aoe go htmltopdf http-server introduction profilecard
Last synced: about 1 month ago
JSON representation
A simple HTTP server to generate profile cards via a multipart-form.
- Host: GitHub
- URL: https://github.com/nico-i/profile-card-gen
- Owner: nico-i
- Created: 2022-09-06T10:35:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-02T17:59:00.000Z (over 1 year ago)
- Last Synced: 2025-02-14T04:29:23.929Z (3 months ago)
- Topics: aoe, go, htmltopdf, http-server, introduction, profilecard
- Language: Go
- Homepage:
- Size: 1.41 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
(AOE) Profile Card Generator
A simple Go HTTP Server for handling multipart-form POST
requests and generating a profile card PDF from the provided data._Please be advised: This project was merely meant to be an exercise for myself during my introduction to Go and Docker. It is therefore by no means considered a finished project._
![]()
## Prerequisites
Make sure you have the following installed on your machine:
- [Go](https://golang.org/doc/install)
- [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html)
- optional: [Docker](https://docs.docker.com/get-docker/)## Installation
1. Clone the repository
```shell
git clone https://github.com/nico-i/profile-card-gen
```2. Navigate to the project directory
```shell
cd profile-card-gen
```3. Install all dependencies
```shell
go get .
```4. Run the service
```shell
go run .
```5. Try it out under [localhost:3000](http://localhost:3000)
## Docker
To run this service inside a docker container,
navigate to the project directory and run the following commands.```shell
docker build --tag docker-profile-card-gen .
docker run -p 3000:3000 docker-profile-card-gen
```## Notes
Currently, the design of the form and card is based on the branding
of AOE, but this can be fitted to your individual needs by editing
the CSS & HTML files inside the [public](./public) directory.## Credits
Based upon the following repos/inputs:
- [docker-wkhtmltopdf](https://github.com/Surnet/docker-wkhtmltopdf)
- [Generating PDFs with Go ~ Diogo Simões](https://cloudoki.com/generating-pdfs-with-go/)