Bored Student
Bored Student
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Bored Student on 1/17/2025 in #questions
Astro Document Processor
How can I add a document Processor to Astro, to add Supported Formats ? I want to make my Docs with starling and I have XML comments that I want to include as an API overview. It would be nice if that already exists, but I'm totally fine writing it myself if anyone has any resources on how to add it.
3 replies
TTCTheo's Typesafe Cult
Created by Bored Student on 11/19/2024 in #questions
How to type react element arguments
I want to take a string like this
const Example = (guid : string) => { ... }
const Example = (guid : string) => { ... }
but when i call it like this it says
Type { guid: string; } is not assignable to type string
Type { guid: string; } is not assignable to type string
So i try to use an anonymous class kind of thing
const Example = ({guid : string}) => { ... }
const Example = ({guid : string}) => { ... }
But that's some mess. The following works
const Example = (input : {guid : string}) => { ... }
const Example = (input : {guid : string}) => { ... }
But that is ugly as hell, how do i write that properly ??
6 replies
TTCTheo's Typesafe Cult
Created by Bored Student on 11/16/2024 in #questions
How to get OpenAi API Key
No description
2 replies
TTCTheo's Typesafe Cult
Created by Bored Student on 11/16/2024 in #questions
Add React to .NET Api
I have written a .NET Api and now i want to create a web app that uses it. And i want to set it up that the .Net server serves that app on the / route (or better any out that's not /api/*). There is some info from microsoft but that almos exclusively to creating a new combined empty project with an VisualStudio template, but i don't want a new empty .NET app and i don't have VS.
7 replies
TTCTheo's Typesafe Cult
Created by Bored Student on 10/7/2024 in #questions
From Post to API
Is it possible to post a from to an API Endpoint but stay on the Page without JS ? I have a project that requires me to use JSP (without JS). And I want to add data to a list, and keep that list in view.
6 replies
TTCTheo's Typesafe Cult
Created by Bored Student on 5/17/2024 in #questions
Whats /aab
Lately I've seen a lot of request in my server log probing for some obvious securit overgishts like GET [host]/.env or GET [host]/wp-admin/setup-config.php but there are some I don't recongnize what they are going for e.g. GET [host]/aab8 GET [host]/aab9``GET [host]/ab2h anyone know if they mean anything ? if so what, just curious
2 replies
TTCTheo's Typesafe Cult
Created by Bored Student on 4/22/2024 in #questions
React Build page
I wanted to deploy a react app to nginx, with the following commands
# [...] repo is fetched and env vars are set
cd $REPO_PATH/Frontend
npm install
npm run build

if [ $? -eq 0 ];
then
echo "Build Frontend, Deploying"
sudo rm -rf /var/www/html/*
sudo cp -r $REPO_PATH/Frontend/build/* /var/www/html/
else
echo "Failed to Build frontend, Kept the old one alive"
fi
# [...] repo is fetched and env vars are set
cd $REPO_PATH/Frontend
npm install
npm run build

if [ $? -eq 0 ];
then
echo "Build Frontend, Deploying"
sudo rm -rf /var/www/html/*
sudo cp -r $REPO_PATH/Frontend/build/* /var/www/html/
else
echo "Failed to Build frontend, Kept the old one alive"
fi
But i found out that npm run build only produces an index.html and i get error 404 if I navigate on the deployed page. Is there a way to fix this without changing the code, it's not mine.
2 replies