~ev/bogbookv3

ae76f216035070efa593ce7b80bd7558683c9150 — Ev Bogue 12 days ago 5d19c1a
add another try/catch
1 files changed, 10 insertions(+), 8 deletions(-)

M server.js
M server.js => server.js +10 -8
@@ 13,15 13,17 @@ console.log(conf)
async function serve (conn) {
  const httpConn = Deno.serveHttp(conn)
  for await (const e of httpConn) {
    if (e.request.url.endsWith('ws')) {
      try {
        servePub(e)
      } catch (err) { console.log(err)}
    } else {
      try {
    try {
      if (e.request.url.endsWith('ws')) {
        try {
          servePub(e)
        } catch (err) { console.log(err)}
      } else {
       try {
        await e.respondWith(serveDir(e.request, {fsRoot: '', showDirListing: true, quiet: true}))
      } catch (err) {console.log(err)}
    }
        } catch (err) {console.log(err)}
      }
    } catch (err) {console.log(err)}
  }
}