NEROX
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
For any content writing task with AI for example, you can pass to ChatGPT the whole list of links and ask it to create in an article the most relevant internal links in a natural way for example.
39 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
I have built the whole API with Wasp and later the extension that makes the calls, I have also created it in tool format: https://whitehatseotactics.com/website-page-counter
39 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
Having all URLs it's easier to automate any kind of interlink, it's very easy extension for now.
39 replies
WWasp
•Created by NEROX on 2/11/2025 in #đŸ™‹questions
Consider updating to 'node16', 'nodenext', or 'bundler'
@kapa.ai
// =============================== IMPORTANT =================================
//
// This file is only used for Wasp IDE support. You can change it to configure
// your IDE checks, but none of these options will affect the TypeScript
// compiler. Proper TS compiler configuration in Wasp is coming soon :)
{
"compilerOptions": {
"module": "esnext",
"target": "esnext",
// We're bundling all code in the end so this is the most appropriate option,
// it's also important for autocomplete to work properly.
"moduleResolution": "bundler",
// JSX support
"jsx": "preserve",
"strict": true,
// Allow default imports.
"esModuleInterop": true,
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"typeRoots": [
// This is needed to properly support Vitest testing with jest-dom matchers.
// Types for jest-dom are not recognized automatically and Typescript complains
// about missing types e.g. when using
toBeInTheDocument
and other matchers.
"node_modules/@testing-library",
// Specifying type roots overrides the default behavior of looking at the
// node_modules/@types folder so we had to list it explicitly.
// Source 1: https://www.typescriptlang.org/tsconfig#typeRoots
// Source 2: https://github.com/testing-library/jest-dom/issues/546#issuecomment-1889884843
"node_modules/@types"
],
// Since this TS config is used only for IDE support and not for
// compilation, the following directory doesn't exist. We need to specify
// it to prevent this error:
// https://stackoverflow.com/questions/42609768/typescript-error-cannot-write-file-because-it-would-overwrite-input-file
"outDir": ".wasp/phantom"
}
}
I'm using Wasp 15, something to be updated?19 replies
WWasp
•Created by NEROX on 2/11/2025 in #đŸ™‹questions
Consider updating to 'node16', 'nodenext', or 'bundler'
@kapa.ai
if my version is v18.20.4
what means the previous warnings?:
[ Wasp ] There are types at '/home/rootall/apps/WhiteHatSeoTactics/app/node_modules/wasp/dist/ext-src/server/webScraper.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
19 replies
WWasp
•Created by NEROX on 2/11/2025 in #đŸ™‹questions
Consider updating to 'node16', 'nodenext', or 'bundler'
@kapa.ai how to check my node version from linux terminal
19 replies
WWasp
•Created by p4j4r5 on 1/29/2025 in #đŸ™‹questions
SEO issue . Twitter or facebook cannot recognise meta tags
I have tested but It doesn't work @martinsos . The image is set from the header of
main.wasp
not from the helmet-async of the page25 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
Just built a Chrome extension with Api, thx Kapa!
39 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
@kapa.ai is possible to test API endpoints in development with localhost:3000?
39 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
Woah let's try
39 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
@kapa.ai
Is this corect?
api getSitemapApi {
fn: import { getSitemap } from "@src/server/webScraper.js",
httpRoute: (GET, "/api/sitemap")
}
api checkUrlStatusApi {
fn: import { checkUrlStatus } from "@src/server/webScraper.js",
httpRoute: (POST, "/api/check-url-status")
}
api getPageContentApi {
fn: import { getPageContent } from "@src/server/webScraper.js",
httpRoute: (GET, "/api/page-content")
}
apiNamespace webScraperApi {
middlewareConfigFn: import { webScraperApiMiddleware } from "@src/middleware.js",
path: "/api"
}
39 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
@kapa.ai
main.wasp:
query getSitemap {
fn: import { getSitemap } from "@src/server/webScraper.js",
entities: []
}
query checkUrlStatus {
fn: import { checkUrlStatus } from "@src/server/webScraper.js",
entities: []
}
query getPageContent {
fn: import { getPageContent } from "@src/server/webScraper.js",
entities: []
}
webScraper.ts:
import axios from 'axios';
import { xml2js } from 'xml-js';
import * as cheerio from 'cheerio';
import puppeteer from 'puppeteer';
import TurndownService from 'turndown';
import type { GetSitemap, CheckUrlStatus, GetPageContent } from 'wasp/server/operations';
// Define input/output types
type GetSitemapArgs = { domain: string };
type CheckUrlStatusArgs = { urls: string[] };
type GetPageContentArgs = { url: string };
// Define XML types
interface XMLLoc {
_text: string;
}
interface XMLUrl {
loc: XMLLoc;
}
interface XMLUrlset {
url: XMLUrl | XMLUrl[];
}
interface XMLSitemap {
loc: XMLLoc;
}
interface XMLSitemapIndex {
sitemap: XMLSitemap | XMLSitemap[];
}
interface XMLResult {
urlset?: XMLUrlset;
sitemapindex?: XMLSitemapIndex;
}
// Export interfaces as plain objects to satisfy SuperJSON
export type UrlStatus = {
url: string;
status: number;
redirectUrl?: string;
}
export type PageContent = {
title: string;
content: string;
contentMd: string;
metadata: {
description: string;
keywords: string;
author: string;
};
styles: string[];
scripts: string[];
inlineStyles: string;
}
what I'm doing creating my API endpoint? fix my example completely
39 replies
WWasp
•Created by NEROX on 2/10/2025 in #đŸ™‹questions
public API for Chrome Extension
@kapa.ai
main.wasp:
query getSitemap {
fn: import { getSitemap } from "@src/server/webScraper.js",
entities: []
}
query checkUrlStatus {
fn: import { checkUrlStatus } from "@src/server/webScraper.js",
entities: []
}
query getPageContent {
fn: import { getPageContent } from "@src/server/webScraper.js",
entities: []
}
webScraper.ts:
import axios from 'axios';
import { xml2js } from 'xml-js';
import * as cheerio from 'cheerio';
import puppeteer from 'puppeteer';
import TurndownService from 'turndown';
import type { GetSitemap, CheckUrlStatus, GetPageContent } from 'wasp/server/operations';
// Define input/output types
type GetSitemapArgs = { domain: string };
type CheckUrlStatusArgs = { urls: string[] };
type GetPageContentArgs = { url: string };
// Define XML types
interface XMLLoc {
_text: string;
}
interface XMLUrl {
loc: XMLLoc;
}
interface XMLUrlset {
url: XMLUrl | XMLUrl[];
}
interface XMLSitemap {
loc: XMLLoc;
}
interface XMLSitemapIndex {
sitemap: XMLSitemap | XMLSitemap[];
}
interface XMLResult {
urlset?: XMLUrlset;
sitemapindex?: XMLSitemapIndex;
}
// Export interfaces as plain objects to satisfy SuperJSON
export type UrlStatus = {
url: string;
status: number;
redirectUrl?: string;
}
export type PageContent = {
title: string;
content: string;
contentMd: string;
metadata: {
description: string;
keywords: string;
author: string;
};
styles: string[];
scripts: string[];
inlineStyles: string;
}
39 replies
WWasp
•Created by p4j4r5 on 1/29/2025 in #đŸ™‹questions
SEO issue . Twitter or facebook cannot recognise meta tags
From what I've been testing, I've only been able to use the meta image I've defined in the head of
main.wasp
The og images do not work with helmet async.
The solution is SSR (or maybe React V19 which allows to add SEO tags directly when Wasp supports it).25 replies
WWasp
•Created by Kynetix on 2/8/2025 in #đŸ™‹questions
Port 5432 is already in use
could you try run
wasp db migrate-dev
/ wasp start
now?10 replies
WWasp
•Created by Noah on 1/31/2025 in #đŸ™‹questions
What's the best way to run fly deploy with arguments?
[email protected] last time they moved my builder to another region because it was unable to start (around 30min)
20 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?
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