frontend: add config for endpoints

Signed-off-by: Nicolas Froger <nicolas@kektus.xyz>
This commit is contained in:
Nicolas Froger 2024-07-25 12:47:45 +02:00
commit bfaa1c0014
No known key found for this signature in database
7 changed files with 19 additions and 7 deletions

View file

@ -3,9 +3,10 @@ import { ref } from 'vue'
import { formatRelative } from 'date-fns'
import { fr } from 'date-fns/locale'
import { marked } from 'marked'
import { API_BASE_URL } from '@/config.js'
export const usePostsStore = defineStore('posts', () => {
const postsApiPath = 'http://localhost:8080/posts'
const postsApiPath = API_BASE_URL + '/posts'
const posts = ref([])