README.md 1.38 KB
Newer Older
1
# Application behind instances.joinpeertube.org
Chocobozzz's avatar
Chocobozzz committed
2

Chocobozzz's avatar
Chocobozzz committed
3
4
## Dev

5
```terminal
Chocobozzz's avatar
Chocobozzz committed
6
7
8
9
$ git submodule update --init --recursive
$ yarn install --pure-lockfile
```

10
Initialize the database:
Chocobozzz's avatar
Chocobozzz committed
11

12
13
14
```terminal
$ sudo -u postgres createuser -P peertube
$ sudo -u postgres createdb -O peertube peertube_instances
Chocobozzz's avatar
Chocobozzz committed
15
```
16
17
18
19

Then run simultaneously (for example with 3 terminals):

```terminal
Chocobozzz's avatar
Chocobozzz committed
20
$ tsc -w
Chocobozzz's avatar
Chocobozzz committed
21
22
```

23
```terminal
Chocobozzz's avatar
Chocobozzz committed
24
25
26
$ node dist/server
```

27
```terminal
Chocobozzz's avatar
Chocobozzz committed
28
29
30
31
32
33
34
$ cd client && npm run serve
```

Then open http://localhost:8080.

## Production

Chocobozzz's avatar
Chocobozzz committed
35
36
In the root of the cloned repo:

37
```terminal
Chocobozzz's avatar
Chocobozzz committed
38
$ git submodule update --init --recursive
Chocobozzz's avatar
Chocobozzz committed
39
$ yarn install --pure-lockfile
Chocobozzz's avatar
Chocobozzz committed
40
$ npm run build
41
42
$ sudo -u postgres createuser -P peertube
$ sudo -u postgres createdb -O peertube peertube_instances
Chocobozzz's avatar
Chocobozzz committed
43
44
$ node dist/server.js
```
45

Chocobozzz's avatar
Chocobozzz committed
46
## PeerTube auto follow & Global Search
47

Chocobozzz's avatar
Chocobozzz committed
48
If you don't want to run this application but would like to have your own index for the [PeerTube auto follow feature](https://docs.joinpeertube.org/#/admin-following-instances?id=automatically-follow-other-instances) or the [Global Search](https://framagit.org/framasoft/peertube/search-index), serve the following JSON format:
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

```
{
  "total": 5,
  "data": [
    {
      "host": "video1.example.com"
    },
    {
      "host": "video2.example.com"
    },
    {
      "host": "video3.example.com"
    },
    {
      "host": "video4.example.com"
    },
    {
      "host": "video5.example.com"
    }
]
Chocobozzz's avatar
Chocobozzz committed
70
```