From 1db2a79131813c69105e07d5b7d19d54003b1d34 Mon Sep 17 00:00:00 2001 From: Max G Date: Fri, 2 Aug 2019 17:14:58 +0000 Subject: [PATCH] Updated server package.json so it will actually rebuild the server with npm install Updated nginx config for the future to see whats going on Removed readme, we don't need it! Created a production release script that will upload build to avidhabit server --- configs/nginx/default | 86 ++++++++++++++++++++----------------------- package.json | 7 +++- readme.md | 3 -- 3 files changed, 46 insertions(+), 50 deletions(-) delete mode 100644 readme.md diff --git a/configs/nginx/default b/configs/nginx/default index a2a1279..b53361d 100644 --- a/configs/nginx/default +++ b/configs/nginx/default @@ -1,54 +1,48 @@ -upstream nodeapp { - ip_hash; - server 127.0.0.1:8081; - server 127.0.0.1:8082; - server 127.0.0.1:8083; - server 127.0.0.1:8084; - server 127.0.0.1:8085; -} - - -server { - listen 80; - listen [::]:80; - server_name _; - return 301 https://$server_name$request_uri; +upstream expressapp { + server 127.0.0.1:3000; + keepalive 8; } server { - listen 443 ssl; - listen [::]:443 ssl; - server_name _; - root /home/mab/pi/client/; + listen 80; - access_log /var/log/nginx/httpslocalhost.access.log; - error_log /var/log/nginx/httpslocalhost.error.log; + server_name logiclabs.icu; + root /home/mab/pi/client/dist; - include snippets/self-signed.conf; - include snippets/ssl-params.conf; + access_log /var/log/nginx/httpslocalhost.access.log; + error_log /var/log/nginx/httpslocalhost.error.log; - location / { - proxy_pass http://localhost:8080; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - } + location / { + autoindex on; + #try_files $uri $uri/ /index.html; + } - location /io { - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_http_version 1.1; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_pass http://nodeapp; - } + location /app { + proxy_pass http://127.0.0.1:8444; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } - location /public { - autoindex on; - alias /home/mab/pi/client/public; - access_log off; - expires max; - } -} + location /api { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-NginX-Proxy true; + + proxy_pass http://expressapp; + proxy_redirect off; + } + + location /solr { + proxy_pass http://127.0.0.1:8983; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + +} \ No newline at end of file diff --git a/package.json b/package.json index 733d6b0..c30440c 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,13 @@ "license": "ISC", "dependencies": { "body-parser": "^1.18.3", + "cheerio": "^1.0.0-rc.3", "express": "^4.16.4", - "request-promise": "^4.2.4" + "jsonwebtoken": "^8.5.1", + "mysql2": "^1.6.5", + "request": "^2.88.0", + "request-promise": "^4.2.4", + "solr-node": "^1.2.1" }, "_moduleAliases": { "@root": ".", diff --git a/readme.md b/readme.md deleted file mode 100644 index 6f83bc4..0000000 --- a/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -Personal or Private net - -This project was designed to create a personal archive of notes, make them easy to sort and serch.