Hypex
Hypex
Explore posts from servers
CDCloudflare Developers
Created by Hypex on 10/11/2024 in #pages-help
Alternatives to DOMPurify?
Both DOMPurify and isometric-dompurify don't work and show a "ReferenceError: window is not defined" error. What alternatives can I use that work with Pages?
2 replies
DTDrizzle Team
Created by Hypex on 10/5/2024 in #help
How to generate type for individual items?
I have a schema.ts here:
import { sql } from 'drizzle-orm';
import { text, integer, sqliteTable } from 'drizzle-orm/sqlite-core';

export const comments = sqliteTable('comments', {
url: text('url'),
authorId: text('author_id').notNull(),
upvotes: integer('upvotes').notNull().default(0),
downvotes: integer('downvotes').notNull().default(0),
parentId: text('parent_id'), // For replies, null if it's a top-level comment
timestamp: text('timestamp')
.notNull()
.default(sql`CURRENT_TIMESTAMP`)
});

export const users = sqliteTable('users', {
id: text('id').primaryKey(),
name: text('name').notNull(),
email: text('email').notNull().unique()
});
import { sql } from 'drizzle-orm';
import { text, integer, sqliteTable } from 'drizzle-orm/sqlite-core';

export const comments = sqliteTable('comments', {
url: text('url'),
authorId: text('author_id').notNull(),
upvotes: integer('upvotes').notNull().default(0),
downvotes: integer('downvotes').notNull().default(0),
parentId: text('parent_id'), // For replies, null if it's a top-level comment
timestamp: text('timestamp')
.notNull()
.default(sql`CURRENT_TIMESTAMP`)
});

export const users = sqliteTable('users', {
id: text('id').primaryKey(),
name: text('name').notNull(),
email: text('email').notNull().unique()
});
How do I generate individual Comment and User types? Thanks!
6 replies
CDCloudflare Developers
Created by Hypex on 7/6/2024 in #pages-help
Custom domain not working
I set my custom domain to skyfall.dev, but it's been around an hour and there is an error page saying "ERR_NAME_NOT_RESOLVED". What do I do? - skyfalldev.pages.dev - Account ID: b7624c46ee3377d0b12e2bf893c00685
2 replies
CDCloudflare Developers
Created by Hypex on 6/24/2024 in #workers-help
How do I get element innerHTML using HTMLRewriter?
Here's my code:
const rewriter = new HTMLRewriter().on('#element', {
element(element) {
// Somehow get element innerHTML
}
}).transform(new Response(html))
const rewriter = new HTMLRewriter().on('#element', {
element(element) {
// Somehow get element innerHTML
}
}).transform(new Response(html))
How do I get the element's innerHTML?
2 replies
CDCloudflare Developers
Created by Hypex on 1/10/2024 in #pages-help
Pages is installing bun 1.0.1
The latest version is 1.0.21. This causes my build to fail. Account ID: b7624c46ee3377d0b12e2bf893c00685
2 replies
RRailway
Created by Hypex on 11/24/2023 in #✋|help
When is GitHub Student support coming?
I think you guys said you would accept GitHub Student status instead of credit card a while ago - is that still gonna happen, and are there gonna be any student benefits?
3 replies
LTLeaning Technologies
Created by Hypex on 11/5/2023 in #support
Can I try CheerpX?
I know it's not fully ready yet, but I think it's fine for my use cases in its current state
19 replies