진보적인
웹 프레임워크
Nuxt와 함께 고품질 웹 애플리케이션을 만들어보세요. Nuxt는 Vue.js로 풀스택 개발을 직관적으로 할 수 있게 해주는 오픈 소스 프레임워크입니다.
app.vue
<script setup lang="ts">
const version = 3
</script>
<template>
<h1>
Hello Nuxt {{ version }}!
</h1>
</template>
<style scoped>
h1 {
font-size: 3rem;
}
</style>
pages/index.vue
<template>
<h1>Index page</h1>
<NuxtLink to="/blog/hello-world">
블로그 글로 이동
</NuxtLink>
</template>
pages/index.vue
<script setup lang="ts">
const { data: page } = await useFetch('/api/cms/home')
</script>
<template>
<h1>{{ page.title }}</h1>
<NuxtLink to="/blog/hello-world">
블로그 글로 이동
</NuxtLink>
</template>
app.vue
<script setup>
const message = ref('Nuxt')
const hello = () => sayHello(message.value)
</script>
<template>
<main>
<h1>자동 임포트 데모</h1>
<form @submit.prevent="hello">
<MyInput v-model="message" />
<button type="submit">인사하기</button>
</form>
</main>
</template>
server/api/hello.ts
export default defineEventHandler((event) => {
return {
message: 'Hello World'
}
})