From efd9dde6aa4c70fdad5d4459a70891cb539a9a01 Mon Sep 17 00:00:00 2001 From: Florian Hartwich Date: Thu, 11 May 2017 21:46:28 +0200 Subject: [PATCH] Fix public folder api path; Add Army Overview --- README.md | 11 ++++ api/README.md | 8 --- api/server.js | 6 +- .../nginx-https-cc-site.txt | 66 +++++++++---------- static/src/app/app.component.html | 6 +- static/src/app/app.config.ts | 1 + static/src/app/app.module.ts | 2 + static/src/app/app.routing.ts | 9 ++- static/src/app/army/army.component.css | 32 +++++++++ static/src/app/army/army.component.html | 61 +++++++++++++++++ static/src/app/army/army.component.ts | 26 ++++++++ static/src/app/models/model-interfaces.ts | 29 ++++++++ .../app/services/army-service/army.service.ts | 19 ++++++ 13 files changed, 224 insertions(+), 52 deletions(-) create mode 100644 README.md delete mode 100644 api/README.md create mode 100644 static/src/app/army/army.component.css create mode 100644 static/src/app/army/army.component.html create mode 100644 static/src/app/army/army.component.ts create mode 100644 static/src/app/services/army-service/army.service.ts diff --git a/README.md b/README.md new file mode 100644 index 0000000..e01cf1a --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ + +#Operation Pandora Trigger Commandcenter + +_RESTful API using express.js and mongoose with mongodb + Angular4 Frontend_ + + +##Installation + +##Development + +##License Information diff --git a/api/README.md b/api/README.md deleted file mode 100644 index bf5adfb..0000000 --- a/api/README.md +++ /dev/null @@ -1,8 +0,0 @@ - -#Operation Pandora Trigger Commandcenter RESTful API - -_node.js project using express.js and mongoose with mongodb_ - - -##Installation - diff --git a/api/server.js b/api/server.js index 4bd0e3f..bb42e65 100644 --- a/api/server.js +++ b/api/server.js @@ -35,8 +35,8 @@ mongoose.Promise = global.Promise; const app = express(); // Middlewares ************************************************* -app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); -app.use(express.static(path.join(__dirname, 'public'))); +app.use(favicon(path.join(__dirname + '/..', 'public', 'favicon.ico'))); +app.use(express.static(path.join(__dirname + '/..', 'public'))); app.use(bodyParser.json()); // logging @@ -63,7 +63,7 @@ app.use(urls.command, apiAuthenticationMiddleware, commandRouter); // send index.html on all different paths app.use(function (req, res) { - res.sendFile("public/index.html", {root: __dirname}); + res.sendFile("public/index.html", {root: __dirname + '/..'}); }); diff --git a/docs/opt-cc-environment/nginx-https-cc-site.txt b/docs/opt-cc-environment/nginx-https-cc-site.txt index 51ad0e9..9850020 100644 --- a/docs/opt-cc-environment/nginx-https-cc-site.txt +++ b/docs/opt-cc-environment/nginx-https-cc-site.txt @@ -1,34 +1,34 @@ - + server { - listen 80; - server_name cc.noarch.de; - return 302 https://$server_name$request_uri; -} - -server { - listen 443 ssl; - server_name cc.noarch.de; - - ssl on; - ssl_certificate /etc/letsencrypt/live/noarch.de/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/noarch.de/privkey.pem; - ssl_session_timeout 5m; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - location / { - gzip off; - proxy_set_header X-Forwarded-Ssl on; - client_max_body_size 5M; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Frame-Options SAMEORIGIN; - proxy_pass http://localhost:8091; - } -} + listen 80; + server_name cc.noarch.de; + return 302 https://$server_name$request_uri; +} + +server { + listen 443 ssl; + server_name cc.noarch.de; + + ssl on; + ssl_certificate /etc/letsencrypt/live/noarch.de/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/noarch.de/privkey.pem; + ssl_session_timeout 5m; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + + location / { + gzip off; + proxy_set_header X-Forwarded-Ssl on; + client_max_body_size 5M; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Frame-Options SAMEORIGIN; + proxy_pass http://localhost:8091; + } +} diff --git a/static/src/app/app.component.html b/static/src/app/app.component.html index 3f36e2d..e506d03 100644 --- a/static/src/app/app.component.html +++ b/static/src/app/app.component.html @@ -15,6 +15,9 @@