frontend to backend communication working, starting on locations page
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user