mahiro mahiro mahiro
mahiro mahiro mahiro
Explore posts from servers
NNuxt
Created by mahiro mahiro mahiro on 4/12/2024 in #❓・help
Nuxt weird error: Cannot destructure property 'type' of 'vnode' as it is null
sr guys i actually solve.
3 replies
NNuxt
Created by mahiro mahiro mahiro on 3/31/2024 in #❓・help
Ways to have local middleware inside server/
import { getServerSession } from "#auth"; import Cart from "~/server/models/cart.schema"; import mongoose from "mongoose"; const appConfig = useAppConfig(); export default defineEventHandler(async (event) => { const session = await getServerSession(event); if (!session) { throw createError(appConfig.error.unauthorized); } currently this is my setup
7 replies
NNuxt
Created by mahiro mahiro mahiro on 3/31/2024 in #❓・help
Ways to have local middleware inside server/
7 replies
NNuxt
Created by mahiro mahiro mahiro on 3/31/2024 in #❓・help
Ways to have local middleware inside server/
it's not long but i don't think copy and paste is a really good practice
7 replies
NNuxt
Created by mahiro mahiro mahiro on 3/31/2024 in #❓・help
Ways to have local middleware inside server/
cuz i use sidebase auth and the way to handling auth is just getServerSession(event). -> if (!session) throw createError(...)
7 replies
NNuxt
Created by mahiro mahiro mahiro on 3/31/2024 in #❓・help
Ways to have local middleware inside server/
i plan to do that also. i plan to put it into utils to have a wrapped around? or i can pass the event params i get from the api routes? what do you think is better?
7 replies
NNuxt
Created by rosalina saige, cutest kitty :3 on 3/31/2024 in #❓・help
passing components up the tree
titlebar = ref("");

passing like this
v-model:titlebar="titlebar"

in children:
<h1> {{ titlebar }} </h1>
const titlebar = defineModel("titlebar")
titlebar.value = ...
titlebar = ref("");

passing like this
v-model:titlebar="titlebar"

in children:
<h1> {{ titlebar }} </h1>
const titlebar = defineModel("titlebar")
titlebar.value = ...
6 replies
NNuxt
Created by rosalina saige, cutest kitty :3 on 3/31/2024 in #❓・help
passing components up the tree
i think you can defineModels on children then having a ref on parent -> you can change the title by changing on the (defineModels on children). that's how i would do it
6 replies
CDCloudflare Developers
Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
I think i found a way to do it
5 replies
CDCloudflare Developers
Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
which combine to only one question. Can I return the same file from the cache with different routes? Thank you in advanced!
5 replies
CDCloudflare Developers
Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
my idea is using wild card like example.com/* in page rule to do this
5 replies
CDCloudflare Developers
Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
Because from my belief everytimes it's being acess. it calls to this route in the backend. so when it's going through cloudflare will it knows that it did not have to fetch again from the backend
5 replies