Fetch API에서 Axios로 변경
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
content="width=device-width, initial-scale=1.0"
|
||||
/>
|
||||
<title>ZUM 허브 - 일상을 읽다</title>
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js" defer></script>
|
||||
<script src="./main.js" type="module" defer></script>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
</head>
|
||||
|
||||
@@ -6,7 +6,10 @@ import store from './src/store.js';
|
||||
import Detail from './src/components/detail.js';
|
||||
|
||||
const category = ['life', 'food', 'trip', 'culture'];
|
||||
const contents = new Contents();
|
||||
const httpClient = axios.create({
|
||||
baseURL: 'http://localhost:3000/api',
|
||||
});
|
||||
const contents = new Contents(httpClient);
|
||||
|
||||
for (const name of category) {
|
||||
contents //
|
||||
|
||||
Reference in New Issue
Block a user