NEROX
NEROX
WWasp
Created by ComputO on 1/3/2025 in #🙋questions
Is there a way to put integrate blog and docs with the login authentication?
hmm, maybe I will make a Blog Template with Markdown. Any notes? Suggestions? Features? Etc?
15 replies
WWasp
Created by Kbral on 1/9/2025 in #🙋questions
Deploy client problem
https://my-wasp-todo-app-server.fly.dev/ Your server is down. Could you check your fly server errors? May you have missed any Var?
7 replies
WWasp
Created by ComputO on 1/3/2025 in #🙋questions
Is there a way to put integrate blog and docs with the login authentication?
15 replies
WWasp
Created by NEROX on 12/18/2024 in #🙋questions
Unable to login with the OAuth provider.
Two in a row today Kapa! here you have a croqueta:da_cookie:
13 replies
WWasp
Created by NEROX on 12/18/2024 in #🙋questions
Unable to login with the OAuth provider.
@kapa.ai I did a: wasp deploy fly cmd secrets set WASP_SERVER_URL=https://api.elmossetgourmet.es --context=server and I'm deploying with the var: REACT_APP_API_URL=https://api.elmossetgourmet.es wasp deploy fly deploy still having the problem, what's wrong?
13 replies
WWasp
Created by William Jin on 12/18/2024 in #🙋questions
Getting CORS issue when using Wasp CLI to deploy
Have you deployed the variables with the server?
43 replies
WWasp
Created by NEROX on 12/18/2024 in #🙋questions
CORS issue
Thx Kapa!
25 replies
WWasp
Created by johnsharp. on 12/12/2024 in #🙋questions
SEO snippet
Hey @johnsharp. , here you have a SEO thread that may help you: #Something wrong with SEO?
7 replies
WWasp
Created by ApexFossa45 on 11/28/2024 in #🙋questions
How to redirect from server in google oath 2.0 to my new domain?
I recorded a tutorial a time ago about this: https://www.loom.com/share/4bd3e1000e5d4afabf8f907b2b18a820 about how to set a domain like api. to the fly server URL
24 replies
WWasp
Created by Obaydah on 12/9/2024 in #🙋questions
Error when running migrate-dev
Hey! Maybe I have experienced similar yesterday (?) In my case I created yesterday new SaaS template and I had problems installing dependencies, I needed to put in my package.json:
"react": "^18.2.0",
"react-apexcharts": "1.4.1",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-icons": "4.11.0",
"react-router-dom": "^6.26.2",
"react": "^18.2.0",
"react-apexcharts": "1.4.1",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-icons": "4.11.0",
"react-router-dom": "^6.26.2",
I already have several apps and it was the first time seeing that error
20 replies
WWasp
Created by NEROX on 12/6/2024 in #🙋questions
Fly (Deploy command failed with exit code: 1)
No description
15 replies
WWasp
Created by NEROX on 12/6/2024 in #🙋questions
Fly (Deploy command failed with exit code: 1)
15 replies
WWasp
Created by NEROX on 12/6/2024 in #🙋questions
Fly (Deploy command failed with exit code: 1)
No description
15 replies
WWasp
Created by NEROX on 12/6/2024 in #🙋questions
Fly (Deploy command failed with exit code: 1)
@kapa.ai How can I do re-auth in fly io console?
15 replies
WWasp
Created by NEROX on 12/6/2024 in #🙋questions
Fly (Deploy command failed with exit code: 1)
Fly Status is all operational, yesterday I haven't that issue
15 replies
WWasp
Created by Dom on 12/2/2024 in #🙋questions
Signup/Login missing in deployed Wasp app
in my case deploy an app without required vars, I go to make a coffee and then when I enter the server logs I see that it has “tried” to restart and compile all those times but as always it is missing some Var. I could recreate the situation by incompletely deploying an app.
43 replies
WWasp
Created by NEROX on 12/5/2024 in #🙋questions
Google Analytics Reverse Proxy
@kapa.ai more info regarding: "If you're looking to self-host Plausible alongside your Wasp application, you would need to set that up separately from your Wasp project and then configure your Wasp app to use your self-hosted Plausible instance."
16 replies
WWasp
Created by NEROX on 12/5/2024 in #🙋questions
Google Analytics Reverse Proxy
@kapa.ai Info for hosting Plausible with Wasp
16 replies
WWasp
Created by NEROX on 12/5/2024 in #🙋questions
Google Analytics Reverse Proxy
A Cursor Proposal, may is something missing?:
In a Wasp/React TypeScript project, we can implement this by creating a proxy API endpoint and modifying how we load the analytics scripts. Here's how to do it: 1. First, create a proxy API endpoint in your Wasp project:
// ... existing code ...

api analyticsProxy {
fn: import { analyticsProxy } from "@src/server/analytics/proxy.ts",
httpRoute: (GET, "/api/analytics/:script"),
}

api tagManagerProxy {
fn: import { tagManagerProxy } from "@src/server/analytics/proxy.ts",
httpRoute: (GET, "/api/gtm/:script"),
}
// ... existing code ...

api analyticsProxy {
fn: import { analyticsProxy } from "@src/server/analytics/proxy.ts",
httpRoute: (GET, "/api/analytics/:script"),
}

api tagManagerProxy {
fn: import { tagManagerProxy } from "@src/server/analytics/proxy.ts",
httpRoute: (GET, "/api/gtm/:script"),
}
2. Create the proxy implementation:
import { Request, Response } from 'express';
import axios from 'axios';

const ANALYTICS_URL = 'https://www.googletagmanager.com/gtag/js';
const GTM_URL = 'https://www.googletagmanager.com/gtm.js';

export const analyticsProxy = async (req: Request, res: Response) => {
try {
const response = await axios.get(`${ANALYTICS_URL}?id=${req.params.script}`, {
responseType: 'stream'
});

// Set appropriate headers
res.setHeader('Content-Type', 'application/javascript');
res.setHeader('Cache-Control', 'public, max-age=3600'); // Cache for 1 hour

// Pipe the response
response.data.pipe(res);
} catch (error) {
console.error('Analytics proxy error:', error);
res.status(500).send('Error loading analytics');
}
};

export const tagManagerProxy = async (req: Request, res: Response) => {
try {
const response = await axios.get(`${GTM_URL}?id=${req.params.script}`, {
responseType: 'stream'
});

// Set appropriate headers
res.setHeader('Content-Type', 'application/javascript');
res.setHeader('Cache-Control', 'public, max-age=3600');

response.data.pipe(res);
} catch (error) {
console.error('Tag Manager proxy error:', error);
res.status(500).send('Error loading tag manager');
}
};
import { Request, Response } from 'express';
import axios from 'axios';

const ANALYTICS_URL = 'https://www.googletagmanager.com/gtag/js';
const GTM_URL = 'https://www.googletagmanager.com/gtm.js';

export const analyticsProxy = async (req: Request, res: Response) => {
try {
const response = await axios.get(`${ANALYTICS_URL}?id=${req.params.script}`, {
responseType: 'stream'
});

// Set appropriate headers
res.setHeader('Content-Type', 'application/javascript');
res.setHeader('Cache-Control', 'public, max-age=3600'); // Cache for 1 hour

// Pipe the response
response.data.pipe(res);
} catch (error) {
console.error('Analytics proxy error:', error);
res.status(500).send('Error loading analytics');
}
};

export const tagManagerProxy = async (req: Request, res: Response) => {
try {
const response = await axios.get(`${GTM_URL}?id=${req.params.script}`, {
responseType: 'stream'
});

// Set appropriate headers
res.setHeader('Content-Type', 'application/javascript');
res.setHeader('Cache-Control', 'public, max-age=3600');

response.data.pipe(res);
} catch (error) {
console.error('Tag Manager proxy error:', error);
res.status(500).send('Error loading tag manager');
}
};
3. Create a custom Analytics component to load the scripts: ``import { useEffect } from 'react'; interface AnalyticsProps { measurementId: string; } export const Analytics: React.FC<AnalyticsProps> = ({ measurementId }) => { useEffect(() => { // Load analytics script through proxy const script = document.createElement('script'); script.async = true; script.src = /api/analytics/${measurementId}`; document.head.appendChild(script);
>
// Initialize gtag window.dataLayer = window.dataLayer || []; function gtag(...args: any[]) { window.dataLayer.push(args); } gtag('js', new Date()); gtag('config', measurementId, { send_page_view: false }); return () => { // Cleanup document.head.removeChild(script); }; }, [measurementId]);
>
return null; };```
4. Update your App component to use the new Analytics component:
import { Analytics } from './analytics/Analytics';

const App = () => {
return (
<>
<Analytics measurementId="G-22P31JZKV2" />
{/* Rest of your app */}
</>
);
};

export default App;
import { Analytics } from './analytics/Analytics';

const App = () => {
return (
<>
<Analytics measurementId="G-22P31JZKV2" />
{/* Rest of your app */}
</>
);
};

export default App;
5. Add necessary type definitions:
interface Window {
dataLayer: any[];
gtag: (...args: any[]) => void;
}
interface Window {
dataLayer: any[];
gtag: (...args: any[]) => void;
}
6. Update your main.wasp file to remove the direct script tags
Does not work
16 replies
WWasp
Created by NEROX on 10/30/2024 in #🙋questions
Error deploying after migrating to ^0.15.0
Woah, answer to that is a little bit difficult, I don't remember very well. I'm checking but I don't have any Wasp 0.14 project to try to migrate again :(
39 replies