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