Update config
This commit is contained in:
10
.env.local
10
.env.local
@@ -1,11 +1,13 @@
|
|||||||
# Options
|
# Options
|
||||||
# VITE_OPTION=true
|
VITE_LIMIT_TIME=2 * 7 * 24 * 60 * 60 * 1000
|
||||||
|
|
||||||
# API related
|
# API related
|
||||||
VITE_API_GRAPHQL_URL_DEV="http://api.housesof.localhost:8055/graphql"
|
# VITE_API_URL_DEV="http://192.168.1.19:8055/graphql"
|
||||||
VITE_API_GRAPHQL_URL_PROD="https://api.housesof.world/graphql"
|
VITE_API_URL_DEV="http://api.housesof.localhost:8055"
|
||||||
|
VITE_API_URL_PROD="https://api.housesof.world"
|
||||||
|
VITE_API_GRAPHQL_PATH="/graphql"
|
||||||
VITE_API_TOKEN="efa40490-152c-49d7-a75b-30a6427439b1"
|
VITE_API_TOKEN="efa40490-152c-49d7-a75b-30a6427439b1"
|
||||||
|
|
||||||
# Analytics
|
# Analytics
|
||||||
VITE_ANALYTICS_KEY=""
|
VITE_ANALYTICS_KEY="c01e378821e6ba7bf9a9f947b107500bfcbd4ae8"
|
||||||
VITE_ANALYTICS_URL="https://stats.flayks.com"
|
VITE_ANALYTICS_URL="https://stats.flayks.com"
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
const apiURL: string = process.env.NODE_ENV === 'development' ? `${import.meta.env.VITE_API_GRAPHQL_URL_DEV}` : `${import.meta.env.VITE_API_GRAPHQL_URL_PROD}`
|
const apiURL: string = process.env.NODE_ENV === 'development'
|
||||||
|
? `${import.meta.env.VITE_API_URL_DEV}`
|
||||||
|
: `${import.meta.env.VITE_API_URL_PROD}`
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6,7 +8,7 @@ const apiURL: string = process.env.NODE_ENV === 'development' ? `${import.meta.e
|
|||||||
*/
|
*/
|
||||||
export const fetchAPI = async (query: string) => {
|
export const fetchAPI = async (query: string) => {
|
||||||
try {
|
try {
|
||||||
const res = await fetch(apiURL, {
|
const res = await fetch(`${apiURL}${import.meta.env.VITE_API_GRAPHQL_PATH}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
Reference in New Issue
Block a user