frontend to backend communication working, starting on locations page

This commit is contained in:
2021-12-08 23:11:50 -05:00
parent ce38e21dca
commit 41f6b5873c
18 changed files with 341 additions and 124 deletions

View File

@@ -1,12 +1,13 @@
import ky from 'ky';
import axios from 'axios';
const url = 'https://sindresorhus.com';
const backendPort = 3500
const backendAPI = ky.create({
headers: {
rainbow: 'rainbow',
unicorn: 'unicorn'
}
});
let baseURL = ""
if (process.env.NODE_ENV !== 'production') {
baseURL = 'http://localhost:3500'
}
export const backendAPI = axios.create({
baseURL: baseURL
})