/open-go-paste

Secure pastebin

Primary LanguageGoDo What The F*ck You Want To Public LicenseWTFPL

OpenGoPaste

Installation

go get github.com/gorilla/mux
go get -u golang.org/x/text/cmd/gotext
go get -u github.com/procyon-projects/chrono
git clone https://github.com/leblanc-simon/open-go-paste
cd open-go-paste/server
go run *.go

Usage

Basic launch

First, build binary :

cd open-go-paste/server
go build -o open-go-server *.go

Then, launch server :

./open-go-server

The server will be launched at http://127.0.0.1:8080 and the datas directory will be ../datas relative to the current working drectory.

Options

All options are managed by environment variables.

  • Customize listen IP : OPEN_GO_PASTE_SERVER=0.0.0.0
  • Customize listen port : OPEN_GO_PASTE_PORT=3000
  • Customize datas directory : OPEN_GO_PASTE_DATAS_FOLDER=/var/open-go-paste/datas
  • Customize CSS : OPEN_GO_PASTE_CUSTOM_CSS="/static/css/custom.css"
  • Customize clean datas CRON : OPEN_GO_PASTE_CRON="0 0 0 * * *" (CRON syntax with seconds)

Internationalisation

In template, we use the function trans. To extract string, use release/extract-message-from-template.sh

Thanks

Authors

License