Skip to content

Commit

Permalink
Log server
Browse files Browse the repository at this point in the history
  • Loading branch information
benborgers committed Jun 4, 2024
1 parent 7b5a2a8 commit 1a6a222
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const respondWithImage = async (url: string, random = false) => {
});
};

export default {
const server = Bun.serve({
async fetch(request) {
const url = new URL(request.url);
const path = url.pathname.replace(/^\/+|\/+$/g, "");
Expand Down Expand Up @@ -104,4 +104,6 @@ export default {

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

console.log({ port: server.port });
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "emojicdn",
"devDependencies": {
"@types/bun": "^1.1.3"
},
"keywords": [],
"license": "ISC",
"scripts": {
Expand Down

0 comments on commit 1a6a222

Please sign in to comment.