According to the official site:
Haste is the prettiest, easiest to use pastebin ever made.
Download the source and expand it.
Install the Node.js Package Manager using Homebrew (for Mac OS), like so …
$ brew install npm
Different OS have different package managers, use whatever works for you. For
example … for Debian based distro’s you’d probably use apt-get install
npm
and for RPM based distro’s would use yum install npm
and so on.
While in the expanded directory install all the required dependencies:
$ npm install
Set the configuration. In my case I didn’t want to use Redis as my data
store and opted to use the filesystem instead, saving the data in
APP_ROOT/data/
. Note the storage:
attribute.
{
"host": "0.0.0.0",
"port": 7777,
"keyLength": 10,
"maxLength": 400000,
"staticMaxAge": 86400,
"recompressStaticAssets": true,
"logging": [
{
"level": "verbose",
"type": "Console",
"colorize": true
}
],
"keyGenerator": {
"type": "phonetic"
},
"storage": {
"path": "./data",
"type": "file"
},
"documents": {
"about": "./about.md"
}
}
Then start the server:
$ npm start
Server should now be running on 0.0.0.0:7777.
The above example shows a local deployment, if you want to set up the server in a publicly accessible (via a network or the internet) … just change the host and port accordingly.
{
"host": "example.com",
"port": 80
}
Server should now be running on example.com since port 80 is usually the default port.