aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2022-01-13 18:23:29 +0000
committers-ol <s+removethis@s-ol.nu>2022-01-13 18:23:29 +0000
commit5395edd40d3763d32b4749bdad942f6d0a7fd54a (patch)
treef5ec526bb4a5a9511cf1ed4256eae23819536fe8
parent(re)Dockerize! (diff)
downloadfedidag-5395edd40d3763d32b4749bdad942f6d0a7fd54a.tar.gz
fedidag-5395edd40d3763d32b4749bdad942f6d0a7fd54a.zip
move/update README
-rw-r--r--README.md52
-rw-r--r--client/README.md17
-rw-r--r--client/src/config.js1
3 files changed, 52 insertions, 18 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..44941a7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,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/
diff --git a/client/README.md b/client/README.md
deleted file mode 100644
index 54d8839..0000000
--- a/client/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-fedidag/client
-==============
-
-Fedidag is a wip DAG-based discussion platform and client for the Fediverse.
-This repository contains the front-end and a sample data.
-
-# Running locally (development)
-To load Mastodon threads, a CORS proxy is needed. You can run it like this:
-
- $ yarn cors
-
-Then the dev server can be started:
-
- $ yarn start
-
-# Running using docker
-The `Dockerfile` sets up NGINX with its own CORS proxy at `/remote/...`.
diff --git a/client/src/config.js b/client/src/config.js
index 91d6231..1da891d 100644
--- a/client/src/config.js
+++ b/client/src/config.js
@@ -1,3 +1,2 @@
-export const PUBLIC_URL = process.env.PUBLIC_URL || `${location.origin}`;
export const API_PREFIX = process.env.API_PREFIX || `${location.origin}`;
export const CORS_PREFIX = process.env.CORS_PREFIX || `${API_PREFIX}/remote`;