Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahBakir97 authored May 29, 2024
1 parent 2c27bf1 commit 1d90a3f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,19 @@ 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
import axios from 'axios';
import axios from 'axios';
const api = axios.create({
baseURL: 'http://localhost:8000/api', // Change this to your actual API base URL
});
const api = axios.create({
baseURL: 'http://localhost:8000/api', // Change this to your actual API base URL
});
export default api;
export default api;
```

2. Vuex Store Configuration:
- Set up Vuex for state management, including handling authentication tokens.
```vue
import { createStore } from 'vuex';
import { createStore } from 'vuex';
import api from '../service/api';
const store = createStore({
Expand Down Expand Up @@ -222,4 +223,4 @@ Ensure that your Vue.js application correctly handles the authentication tokens

## License

This project is licensed under the MIT License - see the LICENSE file for details.
This project is licensed under the MIT License - see the LICENSE file for details.

0 comments on commit 1d90a3f

Please sign in to comment.