posthog plus previews adress
This commit is contained in:
parent
78c22ab7c2
commit
0e1b12a035
@ -56,6 +56,7 @@ export class AppModule implements NestModule {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
const allowedOrigins = [
|
||||
"http://localhost:5173",
|
||||
"http://localhost:4173",
|
||||
"https://www.placebo.mk",
|
||||
"https://placebo.mk",
|
||||
"https://imkapi.oblak.solutions",
|
||||
|
||||
3
frontend/.env
Normal file
3
frontend/.env
Normal file
@ -0,0 +1,3 @@
|
||||
VITE_API_URL=https://imkapi.oblak.solutions
|
||||
REACT_APP_PUBLIC_POSTHOG_KEY=phc_dLQV3ZMDaqyRw0j71BcLwuKCq9CkmKxpKxj3pJwgX7x
|
||||
REACT_APP_PUBLIC_POSTHOG_HOST=https://eu.i.posthog.com
|
||||
1389
frontend/package-lock.json
generated
1389
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,7 @@
|
||||
"date-fns": "^4.1.0",
|
||||
"framer-motion": "^11.18.2",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"posthog-js": "^1.234.4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-icons": "^5.5.0",
|
||||
@ -35,6 +36,6 @@
|
||||
"eslint-plugin-react-refresh": "^0.4.3",
|
||||
"postcss": "^8.4.47",
|
||||
"tailwindcss": "^3.4.14",
|
||||
"vite": "^4.4.5"
|
||||
"vite": "^6.2.4"
|
||||
}
|
||||
}
|
||||
|
||||
6
frontend/src/config/env.ts
Normal file
6
frontend/src/config/env.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export const config = {
|
||||
apiUrl: "https://imkapi.oblak.solutions",
|
||||
REACT_APP_PUBLIC_POSTHOG_KEY:
|
||||
"phc_dLQV3ZMDaqyRw0j71BcLwuKCq9CkmKxpKxj3pJwgX7x",
|
||||
REACT_APP_PUBLIC_POSTHOG_HOST: "https://eu.i.posthog.com",
|
||||
};
|
||||
@ -1,10 +1,21 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import App from './App.jsx'
|
||||
import './index.css'
|
||||
import { PostHogProvider } from "posthog-js/react";
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import App from "./App.jsx";
|
||||
import { config } from "./config/env";
|
||||
import "./index.css";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
const options = {
|
||||
api_host: config.REACT_APP_PUBLIC_POSTHOG_HOST,
|
||||
};
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||
<React.StrictMode>
|
||||
<PostHogProvider
|
||||
apiKey={config.REACT_APP_PUBLIC_POSTHOG_KEY}
|
||||
options={options}
|
||||
>
|
||||
<App />
|
||||
</PostHogProvider>
|
||||
</React.StrictMode>,
|
||||
)
|
||||
);
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
import axios from "axios";
|
||||
|
||||
const API_URL =
|
||||
// process.env.NODE_ENV === "production"
|
||||
"https://imkapi.oblak.solutions";
|
||||
// "http://localhost:3000";
|
||||
|
||||
const API_URL = "https://imkapi.oblak.solutions";
|
||||
const api = axios.create({
|
||||
baseURL: API_URL,
|
||||
withCredentials: true,
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// vite.config.js
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user