2019-12-19 21:50:50 -08:00
|
|
|
##
|
|
|
|
#
|
|
|
|
# This is just a mock config file, describing what is needed to run the app
|
|
|
|
# The app currently only needs two paths / and /api
|
|
|
|
#
|
|
|
|
##
|
|
|
|
|
|
|
|
#
|
|
|
|
# This is needed to define any ports the app may use from node
|
|
|
|
#
|
2019-08-02 10:14:58 -07:00
|
|
|
upstream expressapp {
|
|
|
|
server 127.0.0.1:3000;
|
|
|
|
keepalive 8;
|
2019-07-19 13:51:57 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
2019-08-02 10:14:58 -07:00
|
|
|
|
2019-12-19 21:50:50 -08:00
|
|
|
#
|
|
|
|
# Needed to server up static, compiled JS files and index.html
|
|
|
|
#
|
2019-08-02 10:14:58 -07:00
|
|
|
location / {
|
|
|
|
autoindex on;
|
|
|
|
}
|
|
|
|
|
2019-12-19 21:50:50 -08:00
|
|
|
#
|
|
|
|
# define the api route to connect to the backend and serve up static files
|
|
|
|
#
|
|
|
|
location /api {
|
2019-08-02 10:14:58 -07:00
|
|
|
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;
|
2019-12-19 21:50:50 -08:00
|
|
|
}
|
2019-08-02 10:14:58 -07:00
|
|
|
|
|
|
|
}
|