diff --git a/Makefile.in b/Makefile.in index a1d968f..a6a7bd5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,8 +17,8 @@ front: @nginx_dir@sites_available/@nginx_config@: nginx/yacswa.conf @echo "Installing nginx config..." - @mkdir -p @nginx_dir@sites_available - @cp nginx/yacswa.conf @nginx_dir@sites_available/@nginx_config@ + @sudo mkdir -p @nginx_dir@sites_available + @sudo cp nginx/yacswa.conf @nginx_dir@sites_available/@nginx_config@ install: @public_dir@ @nginx_dir@sites_available/@nginx_config@ diff --git a/backend/Makefile.in b/backend/Makefile.in index 58bd07b..79826f2 100644 --- a/backend/Makefile.in +++ b/backend/Makefile.in @@ -14,8 +14,7 @@ csv: up: .backend.lock .backend.lock: main.scm - @@GUILE@ ./main.scm > yacswa-backend.log & export PID=$$!; echo $${PID} > .backend.lock - @echo "Server spawned with PID $${PID}" && echo $${PID} > .backend.lock && unset PID + @GUILE_AUTO_COMPILE=0 @GUILE@ ./main.scm > yacswa-backend.log & PID=$$!; echo $${PID} > .backend.lock && echo "Server spawned with PID $${PID}" down: - @export PID=`cat .backend.lock` && kill -15 $${PID} && rm .backend.lock && echo "Server on PID $${PID} down."; unset PID + @PID=`cat .backend.lock` && kill -15 $${PID} && rm .backend.lock && echo "Server on PID $${PID} down."; unset PID diff --git a/frontend/Makefile.in b/frontend/Makefile.in index 8e3a875..260bf7e 100644 --- a/frontend/Makefile.in +++ b/frontend/Makefile.in @@ -3,7 +3,7 @@ all: www/elm.js -www/elm.js: +www/elm.js: src/*.elm @ELM@ make src/Main.elm --output=www/elm.js install: www/elm.js @public_dir@ diff --git a/nginx/yacswa.conf.in b/nginx/yacswa.conf.in index bf8cebc..2e83f8f 100644 --- a/nginx/yacswa.conf.in +++ b/nginx/yacswa.conf.in @@ -5,23 +5,27 @@ server { server_name @server_name@ www.@server_name@; - root @public_dir@; - try_files $uri $uri/ /not_found; + root @public_dir@/www; + try_files $uri /not_found; + + location / { + index index.html; + } location /json/pc { - proxy_pass 127.0.0.1:1665/json/pc + proxy_pass http://127.0.0.1:1665/json/pc; } location /json/hr { - proxy_pass 127.0.0.1:1665/json/hr + proxy_pass http://127.0.0.1:1665/json/hr; } location /json/batch { - proxy_pass 127.0.0.1:1665/json/batch + proxy_pass http://127.0.0.1:1665/json/batch; } location /update { - proxy_pass 127.0.0.1:1665/update + proxy_pass http://127.0.0.1:1665/update; } location /not_found {