aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 44941a70d34de1ece65af81b41bc4c1d93499624 (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
fedidag
=======

[Fedidag][fedidag] is an experimental DAG-based discussion platform/client.

It currently supports showing [DiscDAG][discdag] discussions and Mastodon threads.
DiscDAG discussions are available from the main menu.
Mastodon threads can be viewed using `?note=<ROOT_POST_URL>`, e.g.
[`https://dag.s-ol.nu/?note=https://merveilles.town/@s_ol/105627940746565529`](https://dag.s-ol.nu/?note=https://merveilles.town/@s_ol/105627940746565529)

# Running locally (development)
Both the client and proxy server are necessary for either Mastodon or DiscDAG connectivity.
The client can be started like this:

    $ cd client
    $ yarn start # build, watch, and serve the client code
    # (the client dev-server will listen at http://localhost:8080)

And the server like this:

    $ cd server
    $ yarn start
    # (the server will listen at http://localhost:3000)

# Running (production)
Build the client:

    $ cd client
    $ yarn build

Build the server:

    $ cd server
    $ yarn build

Copy the client code and run the server:

    $ cd server
    $ cp ../client/dist/* static/
    $ export NODE_ENV=production
    $ export PUBLIC_URL=http://localhost:3000 # change
    $ export PORT=3000                        # change
    $ node main.js

# Running using docker

    $ docker build -t fedidag .
    $ docker run --rm -e PUBLIC_URL=http://localhost:3000 -e NODE_ENV=production -p 3000:3000 fedidag

[fedidag]: https://dag.s-ol.nu
[discdag]: http://solipsys.co.uk/DiscDAG.html
[mastodon]: https://joinmastodon.org/