]> Untitled Git - lemmy.git/commitdiff
Switching to BrowserRouter.
authorDessalines <tyhou13@gmx.com>
Mon, 15 Jul 2019 02:43:31 +0000 (19:43 -0700)
committerDessalines <tyhou13@gmx.com>
Mon, 15 Jul 2019 02:43:31 +0000 (19:43 -0700)
- Fixes #178.
- #176

README.md
ui/src/index.tsx

index d11f805da4ef7ee56bf29cf57faedec1b4100cfa..b6c3750d1822884330e776bbeedbea5759495a03 100644 (file)
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Front Page|Post
 ## Features
 - Open source, [AGPL License](/LICENSE).
 - Self hostable, easy to deploy.
-  - Comes with [Docker](#docker), [Kubernetes](#kubernetes).
+  - Comes with [Docker](#docker).
 - Live-updating Comment threads.
 - Full vote scores `(+/-)` like old reddit.
 - Moderation abilities.
@@ -65,9 +65,25 @@ docker-compose up -d
 ```
 
 and goto http://localhost:8536
+
+### Nginx Config
+```
+location / {
+  rewrite (\/(user|u|inbox|post|community|c|login|search|sponsors|communities|modlog)+) /static/index.html break;
+  proxy_pass http://0.0.0.0:8536;
+  proxy_set_header X-Real-IP $remote_addr;
+  proxy_set_header Host $host;
+  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+  # WebSocket support
+  proxy_http_version 1.1;
+  proxy_set_header Upgrade $http_upgrade;
+  proxy_set_header Connection "upgrade";
+}
+```
+
 ## Develop
 ### Docker Development
-
 ```
 git clone https://github.com/dessalines/lemmy
 cd lemmy
@@ -75,31 +91,6 @@ cd lemmy
 ```
 
 and goto http://localhost:8536
-### Kubernetes
-#### Requirements
-- Local or remote Kubernetes cluster, i.e. [`minikube`](https://kubernetes.io/docs/tasks/tools/install-minikube/)
-- [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
-- [`skaffold`](https://skaffold.dev/)
-#### Production
-```bash
-# Deploy the Traefik Ingress
-kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-rbac.yaml
-kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-ds.yaml
-# Replace ${IP} with your Ingress' IP
-echo "${IP} dev.lemmy.local" >> /etc/hosts
-```
-
-```bash
-skaffold run -p lemmy--prod
-```
-
-Now go to http://dev.lemmy.local.
-#### Development
-```bash
-skaffold dev -p lemmy--dev
-```
-
-Now go to http://localhost:4444. It automatically proxies to localhost, both if the cluster is local or remote; it also hot-reloads the UI and automatically recompiles and restarts the server.
 ### Local Development
 #### Requirements
 - [Rust](https://www.rust-lang.org/)
@@ -120,7 +111,6 @@ cd lemmy
 # cd server && cargo watch -x run
 ```
 
-and goto http://localhost:8536
 ## Documentation
 - [Websocket API for App developers](docs/api.md)
 - [ActivityPub API.md](docs/apub_api_outline.md)
@@ -129,7 +119,7 @@ and goto http://localhost:8536
 ## Support
 Lemmy is free, open-source software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project.
 - [Support on Patreon](https://www.patreon.com/dessalines).
-- [Sponsor List](https://dev.lemmy.ml/#/sponsors).
+- [Sponsor List](https://dev.lemmy.ml/sponsors).
 - bitcoin: `1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK`
 - ethereum: `0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01`
 ## Credits
index 04160a9fabb98544f666e73651c435f2ece2917d..a50bf2a008db68d91385cee80752c54a89287582 100644 (file)
@@ -34,7 +34,7 @@ class Index extends Component<any, any> {
 
   render() {
     return (
-      <HashRouter>
+      <BrowserRouter>
         <Navbar />
         <div class="mt-1 p-0">
           <Switch>
@@ -64,7 +64,7 @@ class Index extends Component<any, any> {
           <Symbols />
         </div>
         <Footer />
-      </HashRouter>
+      </BrowserRouter>
     );
   }