diff --git a/myToken.json b/myToken.json new file mode 100644 index 000000000..a8ee11042 --- /dev/null +++ b/myToken.json @@ -0,0 +1,12 @@ +{ + "ids": { + "User": 2, + "AccessToken": 1 + }, + "models": { + "User": { + "1": "{\"password\":\"$2a$10$ktoGSPHvrhUPSEytSIRoQuQbq9HRGXEYhrIjP7f4Xx9LXwxeU7vHG\",\"email\":\"admin@admin.com\",\"id\":1}" + }, + "AccessToken": {} + } +} \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 000000000..ff25d3e73 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,45 @@ + +worker_processes 1; + +error_log build/nginx/error.log; +pid build/nginx/nginx.pid; + +events { + worker_connections 1024; +} + +http { + sendfile on; + default_type application/octet-stream; + + access_log build/nginx/access.log; + client_body_temp_path build/nginx/client-body; + proxy_temp_path build/nginx/proxy; + fastcgi_temp_path build/nginx/fastcgi; + uwsgi_temp_path build/nginx/uwsgi; + scgi_temp_path build/nginx/scgi; + + server { + listen 8080; + server_name localhost; + autoindex off; + + location /static { + alias build/public/; + autoindex on; + } + + location ~ ^/account(?:/(.*))?$ { + proxy_pass http://127.0.0.1:3000/$1$is_args$args; + } + + location ~ ^/salix(?:/(.*))?$ { + proxy_pass http://127.0.0.1:3001/$1$is_args$args; + } + + location ~ ^/customer(?:/(.*))?$ { + proxy_pass http://127.0.0.1:3002/$1$is_args$args; + } + } +} + diff --git a/start.cmd b/start.cmd new file mode 100644 index 000000000..7b19cbcb8 --- /dev/null +++ b/start.cmd @@ -0,0 +1,15 @@ +@echo off +echo ###################### +echo "Arrancando Servicios" +echo ###################### +echo. +call forever start forever.json +call forever list + +IF NOT EXIST @salix\build\nginx ( + echo. + echo. + echo "Creando carpeta @salix\build\nginx...." + mkdir @salix\build\nginx +) +call nginx -c nginx.conf -p @salix \ No newline at end of file diff --git a/stop.cmd b/stop.cmd new file mode 100644 index 000000000..65f6fcd06 --- /dev/null +++ b/stop.cmd @@ -0,0 +1,8 @@ +@echo off +echo ###################### +echo "Parando Servicios" +echo ###################### +echo. +call forever stopall +call forever list +call nginx -c nginx.conf -p @salix -s stop \ No newline at end of file