Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


hpr2067 :: Haste - the pastebin alternative

How to install your own haste server

<< First, < Previous, , Latest >>

Hosted by John Duarte on 2016-07-05 is flagged as Explicit and is released under a CC-BY-SA license.
haste, haste-server, haste-client, javascript, nodejs, npm. (Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr2067

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:09:16

general.

Haste

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 node.js

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

Upgrade npm

npm install npm -g

haste-server

Take a look at the haste-server project on github

Clone haste-server git repository

git clone https://github.com/seejohnrun/haste-server.git
cd haste-server

Choose storage method

Choices

  • file system
  • redis
  • memcached

If you will be using the file system storage method, delete storage section in config.js using your favorite text editor.

Install

npm install
npm start &

Use server

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

Using shell to add content

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}'; }

References


Comments

Subscribe to the comments RSS feed.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?