]>
Commit | Line | Data |
---|---|---|
7a7edb72 C |
1 | # Welcome to the contributing guide for PeerTube |
2 | ||
63bfad7e | 3 | Interesting 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 |
14 | You don't need to know how to code to start contributing to PeerTube! Other |
15 | contributions are very valuable too, among which: you can test the software and | |
16 | report bugs, you can give feedback on potential bugs, features that you are | |
63bfad7e | 17 | interested in, user interface, design, decentralized architecture... |
7a7edb72 C |
18 | |
19 | ||
63bfad7e | 20 | ## Write documentation |
7a7edb72 | 21 | |
63bfad7e C |
22 | You can help to write the documentation of the REST API, code, architecture, |
23 | demonstrations... | |
7a7edb72 | 24 | |
63bfad7e | 25 | ## Develop |
7a7edb72 | 26 | |
e755a63a BB |
27 | Don't hesitate to talk about features you want to develop by creating an issue |
28 | before you start working on them :). | |
7a7edb72 | 29 | |
63bfad7e | 30 | ### Prerequisites |
7a7edb72 | 31 | |
63bfad7e C |
32 | First, make sure that you have followed |
33 | [the steps](/support/doc/dependencies.md) | |
34 | to install the dependencies. | |
e755a63a | 35 | |
63bfad7e | 36 | Then 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 | |
44 | Then, 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 | |
46 | there, the following commands would create a new database called `peertube_dev` | |
47 | and a postgres user called `peertube` with password `peertube`: | |
48 | ||
afe81767 | 49 | ``` |
63bfad7e C |
50 | # sudo -u postgres createuser -P peertube |
51 | Enter password for new role: peertube | |
52 | # sudo -u postgres createdb -O peertube peertube_dev | |
e755a63a BB |
53 | ``` |
54 | ||
63bfad7e C |
55 | In dev mode, administrator username is **root** and password is **test**. |
56 | ||
e755a63a BB |
57 | ### Server side |
58 | ||
63bfad7e C |
59 | You can find a documentation of the server code/architecture [here](/support/doc/development/server/code.md). |
60 | ||
e755a63a BB |
61 | To develop on the server-side: |
62 | ||
afe81767 | 63 | ``` |
63bfad7e | 64 | $ npm run dev:server |
e755a63a BB |
65 | ``` |
66 | ||
67 | Then, the server will listen on `localhost:9000`. When server source files | |
68 | change, these are automatically recompiled and the server will automatically | |
63bfad7e | 69 | restart. Server is in `TEST` mode so it will run requests between instances more quickly. |
e755a63a BB |
70 | |
71 | ### Client side | |
72 | ||
63bfad7e C |
73 | You can find a documentation of the server code/architecture |
74 | [here](/support/doc/development/client/code.md). | |
75 | ||
76 | ||
e755a63a BB |
77 | To develop on the client side: |
78 | ||
afe81767 | 79 | ``` |
63bfad7e | 80 | $ npm run dev:client |
e755a63a BB |
81 | ``` |
82 | ||
83 | The API will listen on `localhost:9000` and the frontend on `localhost:3000`. | |
84 | Client files are automatically compiled on change, and the web browser will | |
85 | reload them automatically thanks to hot module replacement. | |
7a7edb72 | 86 | |
63bfad7e | 87 | ### Test federation |
35a12fee | 88 | |
63bfad7e | 89 | This 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 |
96 | Then you will get access to the three nodes at `http://localhost:900{1,2,3}` |
97 | with the `root` as username and `test{1,2,3}` for the password. |