Skip to content

Commit

Permalink
README.md aktualisieren
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahBakir97 authored May 28, 2024
1 parent 7efb5c2 commit 718658a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ Ensure that your Vue.js application correctly handles the authentication tokens

1. Axios Instance Setup:
- Create an Axios instance with the base URL of your Django backend API.
```vue
```vue
import axios from 'axios';
const api = axios.create({
baseURL: 'http://localhost:8000/api', // Change this to your actual API base URL
});
export default api;
```
```
2. Vuex Store Configuration:
- Set up Vuex for state management, including handling authentication tokens.
```vue
```vue
import { createStore } from 'vuex';
import api from '../service/api';
Expand Down Expand Up @@ -164,11 +164,11 @@ Ensure that your Vue.js application correctly handles the authentication tokens
});
export default store;
```
```
3. Router Configuration:
- Set up route guards to protect authenticated routes.

```vue
```vue
import { createRouter, createWebHistory } from 'vue-router';
import Login from '../components/LoginUser.vue';
import TaskBoard from '../components/TaskBoard.vue';
Expand Down Expand Up @@ -197,12 +197,12 @@ Ensure that your Vue.js application correctly handles the authentication tokens
});
export default router;
```
```

4. Main Entry File:
- Integrate the Vuex store and Vue Router into your Vue application.

```vue
```vue
import { createApp } from 'vue';
import App from './App.vue';
import store from './store';
Expand All @@ -218,7 +218,7 @@ Ensure that your Vue.js application correctly handles the authentication tokens
app.config.globalProperties.$http = api;
app.mount('#app');
```
```

## License

Expand Down

0 comments on commit 718658a

Please sign in to comment.