FakeLink is a small backend that provides FLaaS (Fake Links as a Service), based on the Open Graph protocol
A fully automated development environment for this project can be set up with Docker, Rocker and Docker-Compose. Here's how:
bin/docker-build.shcreates two images:- devlucky/fakelink-dev, for development purposes
- devlucky/fakelink, for production purposes (lightweight deployable Go image)
bin/docker-run.shruns the whole project, including its dependencies, and serves it on 8080bin/docker-run.sh bash, where bash can be replaced by any other possible command, executes the command on the project's containers (including dependencies) in an interactive way.
The application exposes the following endpoints:
GET /randomReturns the HTML for a random, public linkGET /links/:slugReturns the HTML for a particular link, identified by its slugPOST /linksTakes a multipart/form-data payload with two keys:- a file "image", to upload
- a field "json" with the following structure:
{
"link": {
"private": false,
"values": {
"title": "A title for my fake link",
"description": "..."
# Other OpenGraph fields. See src/templates package
# to understand the accepted values and they way
# they will be used
}
}
}