aspe:keyoxide.org:RLQZXDQOTFSV55QFFVBYFWWW2Q
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Handler type when `next` is NOT provided and a response is expected | |
export type HandlerWithoutNext<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = | |
(c: Context<E, P, I>) => R; | |
// Handler type when `next` is provided | |
export type HandlerWithNext<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = | |
(c: Context<E, P, I>, next: Next) => void; | |
// Union type to combine both handler types | |
export type Handler<E extends Env = any, P extends string = any, I extends Input = BlankInput, R extends HandlerResponse<any> = any> = HandlerWithoutNext<E, P, I, R> | HandlerWithNext<E, P, I, R>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "vitest-bun-hono", | |
"module": "index.ts", | |
"type": "module", | |
"devDependencies": { | |
"@types/bun": "latest" | |
}, | |
"peerDependencies": { | |
"typescript": "^5.0.0" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"include": [ | |
"**/*.ts", | |
"**/*.tsx", | |
"**/.server/**/*.ts", | |
"**/.server/**/*.tsx", | |
"**/.client/**/*.ts", | |
"**/.client/**/*.tsx" | |
], | |
"compilerOptions": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as readline from "node:readline"; | |
// TODO: remove code when https://github.com/oven-sh/bun/issues/10403 is fixed | |
if (process.stdin.isTTY) { | |
readline.emitKeypressEvents(process.stdin); | |
process.stdin.setRawMode(true); | |
process.stdin.on("keypress", (str, key) => { | |
if (key.ctrl && key.name === "c") process.exit(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const { Sequelize } = require("sequelize"); | |
const db = {}; | |
const fs = require("fs"); | |
const path = require("path"); | |
const sequelize = new Sequelize("xxxx", "xxxx", "xxxx", { | |
host: "xxxx", | |
port: "xxxx", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"code": "AED", | |
"name": "UAE Dirham", | |
"country": "United Arab Emirates", | |
"countryCode": "AE", | |
"flag": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAG5SURBVHja7JdLihRBEEBfVqUU6rQNggiCFxA8gswFRNy49gAeQdx4G8HbuHDvRkRUnKxPZ2dGhous6Y9TtavPZmITtYggXsWPSKOqrCkFK8stgAFKoOr1kiKAt8CD76/f/KYYj//u7bPpU28Mn199eGiBLabg7uWLUePLp08mB/j66xvA1gKVSkK9J/29guuxNCZrVX60905qZlD0xvd5XbPvmN22uo+XCFDZXI2Idjt0txuk9TFM+ve7Yk9MAkAPIKSuI3XdoEMX/aQAd4qSfYpHAI0RbVt0FGA/KYAtyvMMaBTUObRpBh2a0E3cgspewkkJQkDqGm3bQfNPL9/PtIQ+cmjC5OqbTaj9qppRcglCAFej3h9H8P9xnBUgCtRNBllYDj0QmxbWAkgxggiktFjg60PosAeMJnQtAIkRq7poBlIfK5cgRBQdzYC1dtLgVVVRluUJgEQo7XH0RminlBDCKUDK99AIwByXs4gcb0JJafaFc7aCjTlktQBIqpiVAPIYas5AcXEx6LCRzaxjKAn4465GjZ1zs13GBngMPAceLbyFfwJfTP8m2PR6SfGAM7eP07UB/g0Aw73uXdMbeJMAAAAASUVORK5CYII=" | |
}, | |
{ | |
"code": "AFN", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mysql = require("mysql"); | |
const util = require("util"); | |
const dayjs = require("dayjs"); | |
const sqlString = require("sqlstring"); | |
let config = { | |
host: process.env.DB_HOST, | |
user: process.env.DB_USER, | |
port: process.env.DB_PORT || 3306, | |
database: process.env.DB_DATABASE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Lazy Loading with Infinite Scroll</title> | |
<style> | |
#image-container { | |
column-count: 3; | |
column-gap: 10px; |
NewerOlder