pastengo

command module
v0.0.0-...-296c364 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2016 License: MIT Imports: 18 Imported by: 0

README

#Pastengo Build Status GoDoc Go Report Card MIT licensed

Modern self-hosted pastebin service written in Go.

Motivation

Many Pastebin services exist but all are more complicated than they need to be. That is why I decided to write a pastebin service in golang.

This was originally a fork from https://github.com/ewhal/Pastebin, although the code has severely been modified and functionalities altered.

Supports mysql and sqlite3 database drivers.

Paste here Paste content

Getting started

Prerequisities

  • go
  • gcc
  • mysql (optionnal)

Installing

go get github.com/jf-guillou/pastengo
cd /path/to/install
go build github.com/jf-guillou/pastengo
go generate github.com/jf-guillou/pastengo

Updating

go get -u github.com/jf-guillou/pastengo
cd /path/to/install
go build github.com/jf-guillou/pastengo
go generate github.com/jf-guillou/pastengo

Configuration

Go generate should create a copy of the configuration template. You should edit config.json before running pastengo.

Address : Base url used for redirections
Port : HTTP listen port
Length : Length of paste ID
DBType : "sqlite3" or "mysql" based on your preferences
DBName : Database sqlite filename or mysql name 
DBUsername : Mysql database username (unused for sqlite)
DBPassword : Mysql database password (unused for sqlite)

Run

Pastengo will automatically create the required SQL tables required. Running the app is very simple, although we recommand using a process control system like Supervisord.

./pastengo

FAQ

go generate fails

go generate relies on commands that may not be available on your system. Doing this manually is pretty simple :

  • copy folder $GOPATH/src/github.com/jf-guillou/pastengo/assets to /path/to/install/
  • copy file $GOPATH/src/github.com/jf-guillou/pastengo/config.example.json to /path/to/install/config.json

TODO

  • Avoid configuration overwrite on update

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Documentation

Overview

pastengo is a simple pastebin service written in go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL