This guide explains how to configure Vercel to clone private Git submodules during deployment.
Our approach combines the best practices from Timmy O'Mahony's blog post with improvements for better maintainability and error handling.
| <?php | |
| /*############################# | |
| * Developer: Mohammad Sharaf Ali | |
| * Designation: Web Developer | |
| * Version: 2.0 | |
| * | |
| * Changes from Version 1.0: | |
| * - Updated to use a new API endpoint that returns JSON data instead of plain text | |
| * - Replaced file_get_contents with cURL for improved error handling and performance |
This guide explains how to configure Vercel to clone private Git submodules during deployment.
Our approach combines the best practices from Timmy O'Mahony's blog post with improvements for better maintainability and error handling.
If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:
html {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-size: 1.3em;
max-width: 40rem;
padding: 2rem;
margin: auto;
line-height: 1.5rem;| // https://bun.sh/docs/api/glob | |
| import { Glob } from 'bun' | |
| const glob = new Glob('./raw/json/*.json') | |
| for (const file of glob.scanSync('.')) { | |
| console.log(file) | |
| } |
Useful for large projects or occasions where you just need to check something out quickly without downloading everything from a repository
git clone --depth=1 --single-branch --branch=<branch_name_here> <git_repo_url_here>| // TO Explore all the available APIs on SWAPI.INFO, please visit the explorer | |
| // https://swapi.info | |
| const SWAPI_BASE_URL = 'https://swapi.info/api' | |
| async function fetchSwapiData(url) { | |
| try { | |
| const response = await fetch(url) | |
| const data = await response.json() | |
| return data |
| TURSO_DATABASE_URL="..." | |
| TURSO_AUTH_TOKEN="..." |
| import { WagmiProvider, createConfig, http } from "wagmi"; | |
| import { mainnet } from "wagmi/chains"; | |
| import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | |
| import { ConnectKitProvider, getDefaultConfig } from "connectkit"; | |
| const config = createConfig( | |
| getDefaultConfig({ | |
| // Your dApps chains | |
| chains: [mainnet], | |
| transports: { |
| /* /index.html 200 |
| # docker-compose.yml | |
| version: '3.9' | |
| services: | |
| app: | |
| image: "oven/bun" | |
| # override default entrypoint allows us to do `bun install` before serving | |
| entrypoint: [] | |
| # execute bun install before we start the dev server in watch mode | |
| command: "/bin/sh -c 'bun install && bun run --watch src/index.ts'" |