I'm seperating my client side from server side, my client side will build a public folder with webpack and the server side using express with pug template engine, inside the public folder there is my css and js files i was able to use express.static to reference this folder, however I'm trying to serve this folder with nginx but i'm struggling to do this, all i need to be able to reference those files inside my server views folder
client
public
css
main.css
js
main.js
Dockerfile
server
views
index.pug
index.js
Dockerfile
nginx
Dockerfile
default.conf
nginx config
upstream client {
server client:3000;
}
upstream api {
server api:5000;
}
server {
listen 80 default_server;
server_name _;
location / {
proxy_pass http://client;
}
location /sockjs-node {
proxy_pass http://client;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
location /api {
rewrite /api/(.*) /$1 break;
proxy_pass http://api;
}
}
i want to be able to reference the public folder inside client in my server folder i tried /plublic/css/main.css /css/main.css not working