A walk through of installing haste as an open source federated pastebin.com alternative.
See the project at hastebin.com
I ran into project this while following John Kulp’s notes on his blather intro.
Installing via a package manager. See nodejs website for most up-to-date information. Commands given below are just for reference.
RedHat based systems
curl --silent --location https://rpm.nodesource.com/setup | sudo bash -
sudo yum install -y nodejs
Debian based systems
curl --silent --location https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
npm install npm -g
Take a look at the haste-server project on github
git clone https://github.com/seejohnrun/haste-server.git
cd haste-server
Choices
If you will be using the file system storage method, delete storage section in config.js using your favorite text editor.
npm install
npm start &
You can now browse to your new haste-server at the server name or ip at port 7777
. Follow the icon links on the page for usage.
https://<servername>:7777
Create a bash alias to pipe files to the haste file server.
Add the following to your .bashrc
file:
HASTE_SERVER='https://myserver:7777'
haste() { a=$(cat); curl -X POST -s -d "$a" $HASTE_SERVER/documents | awk -v server="$HASTE_SERVER" -F '"' '{print server"/"$4}'; }
Unless otherwise stated, our shows are released under a Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.
The HPR Website Design is released to the Public Domain.