Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benborgers committed Jun 4, 2024
1 parent 5cebdbf commit 7fef1f6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
console.log("Starting", Bun.env.PORT);

import emojiDataset from "./emoji.json";

const emoji: (typeof emojiDataset)[number][] = [];
Expand Down Expand Up @@ -58,7 +56,7 @@ const respondWithImage = async (url: string, random = false) => {
});
};

const server = Bun.serve({
export default {
async fetch(request) {
console.log("request", request.url);
const url = new URL(request.url);
Expand Down Expand Up @@ -105,6 +103,4 @@ const server = Bun.serve({

return respondWithImage(buildRedirectUrl(style, emojiData.image));
},
});

console.log({ port: server });
};

0 comments on commit 7fef1f6

Please sign in to comment.