]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - .github/CONTRIBUTING.md
Add api doc in html
[github/Chocobozzz/PeerTube.git] / .github / CONTRIBUTING.md
CommitLineData
7a7edb72
C
1# Welcome to the contributing guide for PeerTube
2
63bfad7e 3Interesting in contributing? Awesome!
7a7edb72
C
4
5**Quick Links:**
6
7 * [Give your feedback](#give-your-feedback)
7a7edb72 8 * [Write documentation](#write-documentation)
63bfad7e 9 * [Develop](#develop)
7a7edb72
C
10
11
12## Give your feedback
13
e755a63a
BB
14You don't need to know how to code to start contributing to PeerTube! Other
15contributions are very valuable too, among which: you can test the software and
16report bugs, you can give feedback on potential bugs, features that you are
63bfad7e 17interested in, user interface, design, decentralized architecture...
7a7edb72
C
18
19
63bfad7e 20## Write documentation
7a7edb72 21
63bfad7e
C
22You can help to write the documentation of the REST API, code, architecture,
23demonstrations...
7a7edb72 24
63bfad7e 25## Develop
7a7edb72 26
e755a63a
BB
27Don't hesitate to talk about features you want to develop by creating an issue
28before you start working on them :).
7a7edb72 29
63bfad7e 30### Prerequisites
7a7edb72 31
63bfad7e
C
32First, make sure that you have followed
33[the steps](/support/doc/dependencies.md)
34to install the dependencies.
e755a63a 35
63bfad7e 36Then clone the sources and install node modules:
e755a63a 37
afe81767 38```
63bfad7e
C
39$ git clone -b master https://github.com/Chocobozzz/PeerTube
40$ cd PeerTube
41$ yarn install --pure-lockfile
42```
e755a63a
BB
43
44Then, create a postgres database and user with the values set in the
45`config/default.yaml` file. For instance, if you do not change the values
46there, the following commands would create a new database called `peertube_dev`
47and a postgres user called `peertube` with password `peertube`:
48
afe81767 49```
63bfad7e
C
50# sudo -u postgres createuser -P peertube
51Enter password for new role: peertube
52# sudo -u postgres createdb -O peertube peertube_dev
e755a63a
BB
53```
54
63bfad7e
C
55In dev mode, administrator username is **root** and password is **test**.
56
e755a63a
BB
57### Server side
58
63bfad7e
C
59You can find a documentation of the server code/architecture [here](/support/doc/development/server/code.md).
60
e755a63a
BB
61To develop on the server-side:
62
afe81767 63```
63bfad7e 64$ npm run dev:server
e755a63a
BB
65```
66
67Then, the server will listen on `localhost:9000`. When server source files
68change, these are automatically recompiled and the server will automatically
63bfad7e 69restart. Server is in `TEST` mode so it will run requests between instances more quickly.
e755a63a
BB
70
71### Client side
72
63bfad7e
C
73You can find a documentation of the server code/architecture
74[here](/support/doc/development/client/code.md).
75
76
e755a63a
BB
77To develop on the client side:
78
afe81767 79```
63bfad7e 80$ npm run dev:client
e755a63a
BB
81```
82
83The API will listen on `localhost:9000` and the frontend on `localhost:3000`.
84Client files are automatically compiled on change, and the web browser will
85reload them automatically thanks to hot module replacement.
7a7edb72 86
63bfad7e 87### Test federation
35a12fee 88
63bfad7e 89This will run 3 nodes:
7a7edb72 90
afe81767 91```
63bfad7e
C
92$ npm run clean:server:test
93$ npm run play
94```
7a7edb72 95
63bfad7e
C
96Then you will get access to the three nodes at `http://localhost:900{1,2,3}`
97with the `root` as username and `test{1,2,3}` for the password.