#
# serve booklab static portal
#
# author; Petre Iordanescu (petre.iordanescu@gmail.com)
# created at; 22-aug-2028
#

server {
    listen 5002;

    location = / {
        # serve base root through booklabd server
        proxy_pass http://localhost:8000/;
    }

    location /docs/ {
        # serve static portal
        alias /projects/booklab/src/booklab/docs/;
        index index.html index.htm;
    }

    location /api/ {
        # proxy to booklabd API
        proxy_pass http://localhost:8000;
    }

    location /my-books/ {
        # serve as preview one of my 
        # books
        alias 
        /projects/booklab/src/booklab/my_books/; 
        index index.html index.htm;
    }

}



