2016-07-14 02:04:03 +00:00
|
|
|
#Golang Pastebin
|
2016-07-14 01:53:57 +00:00
|
|
|
[![Build Status](https://travis-ci.org/ewhal/Pastebin.svg?branch=master)](https://travis-ci.org/ewhal/Pastebin) [![GoDoc](https://godoc.org/github.com/ewhal/Pastebin?status.svg)](https://godoc.org/github.com/ewhal/Pastebin) [![Go Report Card](https://goreportcard.com/badge/github.com/ewhal/Pastebin)](https://goreportcard.com/report/github.com/ewhal/Pastebin) [![MIT
|
2016-07-17 21:33:26 +00:00
|
|
|
licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/ewhal/Pastebin/master/LICENSE.md)
|
2016-07-14 01:53:57 +00:00
|
|
|
|
2016-07-14 03:21:20 +00:00
|
|
|
Modern self-hosted pastebin service with a restful API.
|
|
|
|
|
|
|
|
## 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.
|
2016-06-11 09:35:31 +00:00
|
|
|
|
2016-07-14 01:53:57 +00:00
|
|
|
![paste](http://i.imgur.com/7BeCKa3.png)
|
|
|
|
|
|
|
|
## Getting started
|
|
|
|
### Prerequisities
|
|
|
|
* pygmentize
|
|
|
|
* go
|
|
|
|
* mariadb
|
2016-07-14 02:04:03 +00:00
|
|
|
|
2016-07-14 01:53:57 +00:00
|
|
|
```
|
|
|
|
pip install pygmentize
|
|
|
|
sudo yum install -y go mariadb-server mariadb
|
|
|
|
```
|
|
|
|
|
|
|
|
### Installing
|
2016-10-20 00:29:31 +00:00
|
|
|
* Please note this assumes you have Mariadb and Go already setup.
|
2016-10-20 00:27:54 +00:00
|
|
|
* go get github.com/ewhal/Pastebin
|
2016-10-20 00:29:31 +00:00
|
|
|
* make
|
2016-10-20 00:25:33 +00:00
|
|
|
* mysql -u root -p
|
|
|
|
* CREATE USER 'paste'@'localhost' IDENTIFIED BY 'password';
|
|
|
|
* CREATE database paste;
|
|
|
|
* GRANT ALL PRIVILEGES ON paste . * TO 'paste'@'localhost';
|
|
|
|
* FLUSH PRIVILEGES;
|
|
|
|
* quit;
|
|
|
|
* mysql -u paste -p paste < database.sql
|
2016-07-19 22:36:25 +00:00
|
|
|
* cp config.example.json config.json
|
|
|
|
* nano config.json
|
|
|
|
* Configure port and database details
|
2016-07-14 01:53:57 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
|
|
|
|
|