hunk.code_window:   app.use(morgan("dev"));
   }
   // server-side redirect
   app.get("/user-gists/:username", (req, res) => {
     res.redirect(301, `/gists/${req.params.username}`);
   });
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit: app.get("/fails.css", (req, res) => {
     res.status(500).send("Boom! No CSS here!");
   });
  
hunk.file_path: fixtures/gists-app/server.js
hunk.type: add
file: import * as fs from "fs";
  import type { BinaryLike } from "crypto";
  import { createHash } from "crypto";
  
  export function getHash(source: BinaryLike): string {
    return createHash("sha256").update(source).digest("hex");
  }
  
  export async function getFileHash(file: string): Promise<string> {
    return new Promise((accept, reject) => {
      let hash = createHash("sha256");
      fs.createReadStream(file)
        .on("error", error => reject(error))
        .on("data", data => hash.update(data))
        .on("close", () => {
          accept(hash.digest("hex"));
        });
    });
  }
  