Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Add oak-middleware-jwt
to the deps.ts
file and export the jwtMiddleware
function."
A block of code is set as follows:
const apiRouter = new Router({ prefix: "/api" }) apiRouter.use(async (_, next) => {   console.log("Request was made to API Router");   await next(); })) … app.use(apiRouter.routes()); app.use(apiRouter.allowedMethods());
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
const app = new Application(); app.use(async (ctx, next) => {   const start = Date.now();   await next();   const ms = Date.now() - start;   ctx.response.headers.set("X-Response-Time", `${ms}ms`); }); … app.use(apiRouter.routes()); app.use(apiRouter.allowedMethods());
Any command-line input or output is written as follows:
$ deno --version deno 1.7.5 (release, x86_64-apple-darwin) v8 9.0.123 typescript 4.1.4
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "If you've used MongoDB, you can see your users created there on the Atlas interface, by going to the Collections menu."
Tips or important notes
Appear like this.