Open gurugeek opened 4 years ago
as a workaround Nginx can be configured to serve all files in the /Public folder
so I did this
## your public folder note you need another folder inside the root folder to serve static
## content so in case of everything in a /Public folder you need /Public/Public --> your files here
root /home/gurugeek/tigerpress_swift/Public;
# pass requests for ExpressSwift
location / {
proxy_pass http://127.0.0.1:8080;
}
## this can be obviously changed to whatever you want the folder to be e.g. /images
location /Public {
try_files $uri $uri/ @backend;
}
this would work fine (and perhaps be even more efficient).
@gurugeek Serving static content isn't supported in current version, but I find it will be a good addition. No ETA though.
I managed to get mustache and mongoDB to work with ExpressSwift, here is a sample route
with a template like this
now body contains html code (which is intentionally not escaped note the 3 { on mustache) e.g. of images
so I would like to know if there is a way to load these images from a /public folder :)