move/update README
s-ol
1 year, 8 months ago
|
0 |
fedidag
|
|
1 |
=======
|
|
2 |
|
|
3 |
[Fedidag][fedidag] is an experimental DAG-based discussion platform/client.
|
|
4 |
|
|
5 |
It currently supports showing [DiscDAG][discdag] discussions and Mastodon threads.
|
|
6 |
DiscDAG discussions are available from the main menu.
|
|
7 |
Mastodon threads can be viewed using `?note=<ROOT_POST_URL>`, e.g.
|
|
8 |
[`https://dag.s-ol.nu/?note=https://merveilles.town/@s_ol/105627940746565529`](https://dag.s-ol.nu/?note=https://merveilles.town/@s_ol/105627940746565529)
|
|
9 |
|
|
10 |
# Running locally (development)
|
|
11 |
Both the client and proxy server are necessary for either Mastodon or DiscDAG connectivity.
|
|
12 |
The client can be started like this:
|
|
13 |
|
|
14 |
$ cd client
|
|
15 |
$ yarn start # build, watch, and serve the client code
|
|
16 |
# (the client dev-server will listen at http://localhost:8080)
|
|
17 |
|
|
18 |
And the server like this:
|
|
19 |
|
|
20 |
$ cd server
|
|
21 |
$ yarn start
|
|
22 |
# (the server will listen at http://localhost:3000)
|
|
23 |
|
|
24 |
# Running (production)
|
|
25 |
Build the client:
|
|
26 |
|
|
27 |
$ cd client
|
|
28 |
$ yarn build
|
|
29 |
|
|
30 |
Build the server:
|
|
31 |
|
|
32 |
$ cd server
|
|
33 |
$ yarn build
|
|
34 |
|
|
35 |
Copy the client code and run the server:
|
|
36 |
|
|
37 |
$ cd server
|
|
38 |
$ cp ../client/dist/* static/
|
|
39 |
$ export NODE_ENV=production
|
|
40 |
$ export PUBLIC_URL=http://localhost:3000 # change
|
|
41 |
$ export PORT=3000 # change
|
|
42 |
$ node main.js
|
|
43 |
|
|
44 |
# Running using docker
|
|
45 |
|
|
46 |
$ docker build -t fedidag .
|
|
47 |
$ docker run --rm -e PUBLIC_URL=http://localhost:3000 -e NODE_ENV=production -p 3000:3000 fedidag
|
|
48 |
|
|
49 |
[fedidag]: https://dag.s-ol.nu
|
|
50 |
[discdag]: http://solipsys.co.uk/DiscDAG.html
|
|
51 |
[mastodon]: https://joinmastodon.org/
|
0 | |
fedidag/client
|
1 | |
==============
|
2 | |
|
3 | |
Fedidag is a wip DAG-based discussion platform and client for the Fediverse.
|
4 | |
This repository contains the front-end and a sample data.
|
5 | |
|
6 | |
# Running locally (development)
|
7 | |
To load Mastodon threads, a CORS proxy is needed. You can run it like this:
|
8 | |
|
9 | |
$ yarn cors
|
10 | |
|
11 | |
Then the dev server can be started:
|
12 | |
|
13 | |
$ yarn start
|
14 | |
|
15 | |
# Running using docker
|
16 | |
The `Dockerfile` sets up NGINX with its own CORS proxy at `/remote/...`.
|
0 | |
export const PUBLIC_URL = process.env.PUBLIC_URL || `${location.origin}`;
|
1 | 0 |
export const API_PREFIX = process.env.API_PREFIX || `${location.origin}`;
|
2 | 1 |
export const CORS_PREFIX = process.env.CORS_PREFIX || `${API_PREFIX}/remote`;
|