Neamix
Neamix
Explore posts from servers
NNuxt
Created by Neamix on 6/30/2024 in #❓・help
Get api domain in nitro server file
Greeting i created server route that go to api and check the phone if it exist before or not here it's
export default defineEventHandler(async (event) => {
let config = useRuntimeConfig();
let domain = config.public.apiURL;
let route = domain+'/api/user/phone/count';
const body = await readBody(event);
return await $fetch(route, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: 'post',
body: {
phone: body.phone,
countryCode: body.countryCode
}
})
})
export default defineEventHandler(async (event) => {
let config = useRuntimeConfig();
let domain = config.public.apiURL;
let route = domain+'/api/user/phone/count';
const body = await readBody(event);
return await $fetch(route, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: 'post',
body: {
phone: body.phone,
countryCode: body.countryCode
}
})
})
and here it my env file
apiURL=https://app.rifq.me
apiURL=https://app.rifq.me
every thing is cool on local but on production i got File not found error (Note: api route is same on local and prod)
3 replies
NNuxt
Created by Neamix on 6/17/2024 in #❓・help
Create .env file
How can i create .env file i read the docs and according to it .env should be exist in nuxt installation but i cant find it and i tried to use this command
npx nuxi dev --dotenv .env.local

npx nuxi dev --dotenv .env.local

and it open dev server not create a new .env file
5 replies
NNuxt
Created by Neamix on 6/3/2024 in #❓・help
Deploy Nuxt 3 app with forge
How can i deploy nuxt 3 app using forge i tried to find any tutorial but i didnt find any
1 replies
NNuxt
Created by Neamix on 5/30/2024 in #❓・help
Nuxt server api get validation error
Hello, i am using Laravel as a backend and Nuxt 3 as front and i am sending requests from front to back using server api so how can i catch validation error that Laravel send it back i tried to catch it but Nuxt return to me the error not the missing validations
1 replies
NNuxt
Created by Neamix on 5/28/2024 in #❓・help
Send otp from firebase
Hello, I want to send OTPs from a Nuxt 3 app using Firebase. I tried to find plugins or documentation to help integrate Firebase Phone Authentication, but I couldn't find any. If anyone can share a method with me, I would be thankful.
1 replies
NNuxt
Created by Neamix on 5/18/2024 in #❓・help
Error page ui doesnt changed
Hello, So i tried to change the ui of the error page by adding error.vue in the root but the ui did not change
2 replies