First commit!

This commit is contained in:
Florian Sylvain
2022-10-12 09:44:03 +02:00
commit 878fb42def
26 changed files with 3800 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
<script setup lang="ts">
import { RouterView } from 'vue-router'
</script>
<template>
<RouterView />
</template>
View File
+15
View File
@@ -0,0 +1,15 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import './assets/main.css'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.mount('#app')
+15
View File
@@ -0,0 +1,15 @@
import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: Home
},
]
})
export default router
+8
View File
@@ -0,0 +1,8 @@
export interface Pong {
message: string;
}
export function pingApi(): Promise<Pong> {
return fetch('http://localhost:8080/ping')
.then(response => response.json())
}
+17
View File
@@ -0,0 +1,17 @@
<script setup lang="ts">
// import EditorJS from '@editorjs/editorjs';
import { pingApi } from '@/utils/ping';
console.log('ping...')
pingApi().then(response => {
console.log(`${response.message}!`)
})
</script>
<template>
<p>Salut à tous</p>
</template>
<style scoped>
</style>