| Route | Layout | Content-Type |
|---|---|---|
/comics OR /comics?page=1&offset=100 |
Gallery Pagination | text/html; charset=utf-8 |
/comics/:comics-number |
Comics stand alone | text/html; charset=utf-8 |
/api/comics?page=1&offset=100 |
N/A | application/json;charset=utf-8 |
/api/comics/:comics-number |
N/A | application/json;charset=utf-8 |
Default port 1729
deno run --allow-all ./start.ts
docker run --rm -it --env PORT=8080 DENO_ENV=production -p 8080:8080 fusionstrings/abcd:v0.1.0docker build --pull --rm -f "Dockerfile" -t abcd:latest "."
The project uses Deno and by that extension it also uses Deno's flavour of typescript.
The reason to choose Deno is driven by improved developer ergonomics towards prototyping without giving up on viable toolings. Infact it is modern in manyways, such as-
window, addEventListener, removeEventListener, fetch, Standard HTTP ESM import/export, importmaps, Workers etc. Some of these quite mature browser APIs have lack of support in contemporary frontend build tooling.curl -fsSL https://deno.land/x/install/install.sh | sh
dev.ts is the development and start.ts is the non-development mode application entry point and every dependency is expressed through ESM imports / exports.importmap.json can be used to simulate node flavour of bare imports, this is very useful to share components across node js projects.deps.tsServer exports the server as default export, which can be used to pass custom Server Request handlers.mod.ts is the public API.src folder contains source code.routes folder contain route handlers called from Server.try/catch is used extensively as opposed to other control flow-try/catch blocks as they can be viewd as nested async functions. This adds to the boilerplate but a fair trade.functions.ts contains reusable functions.