From e49948777d58d3f39a0932db970e3401a6af3c87 Mon Sep 17 00:00:00 2001 From: Romain de Laage Date: Mon, 1 Mar 2021 12:41:08 +0100 Subject: [PATCH] Add makefile .gitignore, change example config and add go mod --- .gitignore | 2 ++ Makefile | 9 +++++++++ config.json | 6 +++--- go.mod | 3 +++ 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 go.mod diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f204c5b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +certs/* +build/* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..debea2b --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +all: amd64 arm7 + +amd64: + mkdir -p build + GOOS=linux GOARCH=amd64 go build -o build/mastogem-amd64 + +arm7: + mkdir -p build + GOOS=linux GOARCH=arm GOARM=7 go build -o build/mastogem-arm7 diff --git a/config.json b/config.json index 9aca3b3..932573d 100644 --- a/config.json +++ b/config.json @@ -1,8 +1,8 @@ { "listen": "0.0.0.0:1965", - "cert_path": "cert.pem", - "key_path": "key.rsa", + "cert_path": "certs/cert.pem", + "key_path": "certs/key.rsa", "base_url": "https://mamot.fr", "title": "MastoGem", - "home_message": "Welcome on MastoGem, a Mastodon proxy for Gemini.\\nYou can view the last 20 toots of a Mastodon account by providing its id, for example:\\n=> gemini://localhost/310515 My Mastodon account" + "home_message": "Welcome on MastoGem, a Mastodon proxy for Gemini.\nYou can view the last 20 toots of a Mastodon account by providing its id, for example:\n=> gemini://localhost/310515 My Mastodon account" } diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..595fd55 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.rdelaage.ovh/mastoGem + +go 1.16