mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-18 05:25:08 +00:00
Remove Mirage; add json-server with first email included
This commit is contained in:
@@ -11,9 +11,8 @@
|
||||
|
||||
export default {
|
||||
async setup(){
|
||||
let response = await fetch('/api/emails');
|
||||
let {emails} = await response.json();
|
||||
|
||||
let response = await fetch('http://localhost:3000/emails');
|
||||
let emails = await response.json();
|
||||
emails = ref(emails);
|
||||
|
||||
return {emails};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { createApp } from 'vue';
|
||||
import App from './App.vue';
|
||||
import '../mirage/index';
|
||||
|
||||
createApp(App).mount('#app');
|
||||
|
||||
Reference in New Issue
Block a user