Added preview
This commit is contained in:
parent
cd9ed2f991
commit
7c3a309b46
|
@ -9,7 +9,8 @@
|
||||||
"build:web": "vue-tsc --noEmit && vite build",
|
"build:web": "vue-tsc --noEmit && vite build",
|
||||||
"build:server": "tsc --project tsconfig.server.json",
|
"build:server": "tsc --project tsconfig.server.json",
|
||||||
"build": "npm run clean && npm run build:web && npm run build:server",
|
"build": "npm run clean && npm run build:web && npm run build:server",
|
||||||
"preview": "vite preview",
|
"preview:web": "vite preview --host",
|
||||||
|
"preview": "npm run build && npm start",
|
||||||
"start": "NODE_ENV=production node dist/server"
|
"start": "NODE_ENV=production node dist/server"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -17,9 +17,13 @@ const ipAddress = ref('')
|
||||||
const loadingIpAddress = ref(false)
|
const loadingIpAddress = ref(false)
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
try {
|
||||||
loadingIpAddress.value = true
|
loadingIpAddress.value = true
|
||||||
ipAddress.value = await trpc.myIp.query()
|
ipAddress.value = await trpc.myIp.query()
|
||||||
|
} catch (error: any) {
|
||||||
|
ipAddress.value = error.message
|
||||||
|
} finally {
|
||||||
loadingIpAddress.value = false
|
loadingIpAddress.value = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user