const ips = request.headers.get('x-forwarded-for'); // comma-separated list of IPs
This file contains hidden or 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 {defineConfig} from 'vite'; | |
import hydrogen from '@shopify/hydrogen/plugin'; | |
import shopifyConfig from './shopify.config'; | |
// https://vitejs.dev/config/ | |
export default defineConfig({ | |
plugins: [hydrogen(shopifyConfig)], | |
}); |
This file contains hidden or 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
// ---- User code: | |
addEventListener("fetch", event => { | |
event.respondWith(handleEvent(event)) | |
}) | |
// ---- Lib code: | |
const globalStuff = new Map(); | |
async function handleEvent({request}) { | |
// Generate a unique ID for this request |
This file contains hidden or 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
<template> | |
<v-ons-page> | |
<v-ons-toolbar :style="swipeTheme"> | |
<div class="center">Swiping Tab Bar</div> | |
</v-ons-toolbar> | |
<v-ons-tabbar | |
swipeable | |
position="top" | |
:tabs="tabs" |