a collection of tools to run and manage your own web services with minimal overhead
The current web services stack
The SOS stack is a stack that simply addresses the question "how can I 100% publishing on this random computer I just found?"
Common stack combinations
for webservices i use nginx for two main things; handling SSL and proxying to other physical computers
the simplest entry that works for static file serving with svelte or hand rolled html is
server {
server_name bil.dev www.bil.dev;
root /home/bil/svelte/bil.dev/build;
index index.html;
}
in the above svelte example, i have nginx pointed directly at the build folder
the trick here is to treat the file hosting as a json index. this way we are able to source image information automatically rather than hardcoding it into svelte
server {
server_name files.bil.dev;
root /home/bil/files/bil.dev;
autoindex on;
autoindex_format json;
add_header Access-Control-Allow-Origin *;
}
It is important to add the CORS header here so that the fetch request will work
two great places for this architecture is hendersoncat.com to load up random images without needing to track them and bil.dev projects