aboutsummaryrefslogtreecommitdiff
path: root/doc/install-guide.html
blob: 125fd7cbb95b48651621f3ab602b0e15ab9136b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>ssb-npm + git-ssb + patchfoo install</title>
<style>
body {
  font: 16pt sans-serif;
}
</style>
</head>
<body>
<h2>Installing ssb-npm + git-ssb + patchfoo</h2>
<p>cel 2019-02-25; updated 2019-11-29</p>

<h3>Set up npm</h3>
<p>If you haven't already done so, set a prefix for <code>npm</code> and add its bin directory to your <code>$PATH</code>:</p>
<pre>
echo prefix=$HOME/.local &gt;&gt; ~/.npmrc
echo PATH=\$PATH:$HOME/.local/bin &gt;&gt; ~/.profile
PATH=$PATH:$HOME/.local/bin
</pre>

<h3>Enable large ssb blobs</h3>
<p>Put into <code>~/.ssb/config</code>:</p>
<pre>
{
  "blobs": {
    "max": 30000000
  }
}
</pre>
<p>Restart ssb-server or Patchwork.</p>

<h3>Install ssb-npm</h3>
<pre>
mkdir -p /tmp/ssb-npm-registry-2.1.0 &amp;&amp; cd /tmp/ssb-npm-registry-2.0.1 &amp;&amp;
curl -s 'http://localhost:8989/blobs/get/&amp;ICm1gBw79PitW1qUuq5jIJJtjyfkfPfpuHQfPeGpmJ4=.sha256' | tar xz &amp;&amp;
./package/bootstrap/bin.js --ws-url http://localhost:8989 \
  --branch %/hNT8vXLGN9IoVUwLdSbw/9UgKjFI0AOnlQl/0129Tw=.sha256 \
  install -g ssb-npm@2.0.1
</pre>

<h3>Install git-ssb</h3>
<pre>
ssb-npm install -g git-ssb@2.6.1 \
  --branch %+GtKJu3CCEQlDzGmJbZaGP3yrJCEIvUbvBq3BpuoRmE=.sha256 \
  --branch %RuoAU/5P9fDa/+vucRrIhq4qk4cnaQspY2Yyzu6oR7U=.sha256
</pre>

<h3>Clone and install patchfoo</h3>

<h4>As a standalone program (ssb-client):</h4>
<pre>
git clone ssb://%YAg1hicat+2GELjE2QJzDwlAWcx0ML+1sXEdsWwvdt8=.sha256 patchfoo
cd patchfoo
ssb-npm install --branch %SizoOItHdaFQtoDkpX/r4KdOmum7BKEbnE9Rx/UWRAQ=.sha256 \
  --branch %o3t1vSU0S/cOR1HM+H5TTKTDaZbTnv+SDLVji3l0r0A=.sha256
npm start
</pre>

<h4>or as a sbot plugin:</h4>
<pre>
mkdir ~/.ssb/node_modules
cd ~/.ssb/node_modules
git clone ssb://%YAg1hicat+2GELjE2QJzDwlAWcx0ML+1sXEdsWwvdt8=.sha256 patchfoo
cd patchfoo
ssb-npm install --branch %SizoOItHdaFQtoDkpX/r4KdOmum7BKEbnE9Rx/UWRAQ=.sha256 \
  --branch %o3t1vSU0S/cOR1HM+H5TTKTDaZbTnv+SDLVji3l0r0A=.sha256
sbot plugins.enable patchfoo
</pre>
<p>Restart ssb-server or Patchwork.</p>
<p>Visit patchfoo at <a href="http://localhost:8027/">http://localhost:8027/</a>.</p>
</body>
</html>