- Next14 (app router) deployed on Cloudflare Page
- Tailwind for UI
- Cloudflare D1 Database with DrizzleORM
- OpenAI (GPT3.5 Turbo)
- Namecheap for domain names
- Scaleway Transactional Email Service
- Mixpanel for Analytics
- Sentry for Production Error catching
- Github to host my code
- Stripe for paywalls
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
/** | |
* Welcome to Cloudflare Workers! This is your first worker. | |
* | |
* - Run `npm run dev` in your terminal to start a development server | |
* - Open a browser tab at http://localhost:8787/ to see your worker in action | |
* - Run `npm run deploy` to publish your worker | |
* | |
* Bind resources to your worker in `wrangler.toml`. After adding bindings, a type definition for the | |
* `Env` object can be regenerated with `npm run cf-typegen`. | |
* |
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
export class D1ProxyClient { | |
private workerUrl: string; | |
private apiKey: string; | |
constructor(workerUrl: string, apiKey: string) { | |
this.workerUrl = workerUrl; | |
this.apiKey = apiKey; | |
} | |
async query(sql: string, params: any[] = []) { | |
const response = await fetch(this.workerUrl, { | |
method: "POST", |
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
- mettre en place le cycle de vie de ton projet post-MVP | |
- réduire les coûts techniques dans vos process déjà existants (développement & infra) | |
- auditer la sécurité de vos applications (API, app web, mobile & de bureau) | |
- former vos équipes techniques |
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
function generateRandomIPv6() { | |
const getRandomHexSegment = () => Math.floor(Math.random() * 0x10000).toString(16).padStart(4, '0'); // Generates a random 4-digit hexadecimal segment | |
// Generate 8 segments and join them with colons | |
return `${getRandomHexSegment()}:${getRandomHexSegment()}:${getRandomHexSegment()}:${getRandomHexSegment()}:${getRandomHexSegment()}:${getRandomHexSegment()}:${getRandomHexSegment()}:${getRandomHexSegment()}`; | |
} | |
(async () => { | |
let requestCount = 0; // Initialize request count | |
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); // Delay function |
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
BUN_VERSION="1.1.29" | |
don't forget to encrypt the value |