sen.py
sen.py
TTCTheo's Typesafe Cult
Created by sen.py on 8/17/2023 in #questions
depends_on alternative docker swarm
Using docker swarm for deployment where I'm using the docker-compose file I made before. Previoulsy it had a depends_on directive where I can specify nginx to not start before the api_serivce. Running in swarm it seems it ignores depends_on completely is there any alternative?
2 replies
TTCTheo's Typesafe Cult
Created by sen.py on 2/10/2023 in #questions
JS/TS intellisense not working
Just added typescript support to huge JS project while upgrading to webpack 5. Now everything runs fine, compiles fine and work as expected except for the vscode intellisense. If I'm inside a js file and trying to import a .tsx comonent the ctrl+space auto complete only shows .js components and not .tsx ones same happens otherway were .js components are not auto complete in .tsx files. I can manually go up and import them it works great. Types and everything work as exepcted. Heres the tsconfig. Babel is also used if that information might affect this.
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": false,
"jsx": "react-jsx",
"incremental": true,
"outDir": "dist",
},
"include": [
"frontend/**/*.ts",
"frontend/**/*.tsx"
],
"exclude": [
"node_modules",
"dist",
]
}
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": false,
"jsx": "react-jsx",
"incremental": true,
"outDir": "dist",
},
"include": [
"frontend/**/*.ts",
"frontend/**/*.tsx"
],
"exclude": [
"node_modules",
"dist",
]
}
2 replies
TTCTheo's Typesafe Cult
Created by sen.py on 11/14/2022 in #questions
Better way to this kind of UI in react (State Based)?
{playState === PLAY_STATE.NOT_STARTED && "Debug Mode"}
{playState === PLAY_STATE.PLAYING && (
<div className="flex items-center gap-x-1">
<span className="rounded-full h-2 w-2 bg-[color:#59B655]"></span>
Debugging ongoing
</div>
)}
{playState === PLAY_STATE.PAUSED && (
<div className="flex items-center gap-x-1">
<div className="rounded-full h-2 w-2 bg-[color:#3E85CA]"></div>
Debugging paused
</div>
)}
{playState === PLAY_STATE.STOPPED && (
<div className="flex items-center gap-x-1">
<div className="rounded-full h-2 w-2 bg-[color:#FF5B5B]"></div>
Debugging stopped
</div>
)}

{playState === PLAY_STATE.NOT_STARTED && "Debug Mode"}
{playState === PLAY_STATE.PLAYING && (
<div className="flex items-center gap-x-1">
<span className="rounded-full h-2 w-2 bg-[color:#59B655]"></span>
Debugging ongoing
</div>
)}
{playState === PLAY_STATE.PAUSED && (
<div className="flex items-center gap-x-1">
<div className="rounded-full h-2 w-2 bg-[color:#3E85CA]"></div>
Debugging paused
</div>
)}
{playState === PLAY_STATE.STOPPED && (
<div className="flex items-center gap-x-1">
<div className="rounded-full h-2 w-2 bg-[color:#FF5B5B]"></div>
Debugging stopped
</div>
)}

3 replies
TTCTheo's Typesafe Cult
Created by sen.py on 11/12/2022 in #questions
Easy drop in payment solution? that works with t3 or nextjs
Easy drop in payment solution? that works with t3 or nextjs
2 replies
TTCTheo's Typesafe Cult
Created by sen.py on 11/12/2022 in #questions
Dashboards with Tailwind
Anyone know some good Dashboard starts with tailwind which then I can customize?
8 replies
TTCTheo's Typesafe Cult
Created by sen.py on 10/24/2022 in #questions
Scale Node+express
Having issues with handling large amount of incoming requests as server responds 504 soon, Currently running pm2 to handle multiple of them at same time where single user will have multiple requests sent over period of time. Is there way to queue these incoming request and guaranteed consume them in order (Also need to keep the order each users requests in mind like A1, A2, A3 should be ordered from user A but B1. B2, B3 can be processed in parallel)
26 replies
TTCTheo's Typesafe Cult
Created by sen.py on 10/22/2022 in #questions
Load Testing APIs, trying to simulate behavior of users who is hitting same API to progress.
Anyone have any Idea on how you can loadtest backend nodejs API, trying to simulate a one after another request by the same user and multiple of them. Is this enough what other scenarios I should think of or is there anything else am I missing? I'm using jmeter for now, But I'm open to anything else
10 replies
TTCTheo's Typesafe Cult
Created by sen.py on 10/13/2022 in #questions
What is this React pattern called?
<Popper id={id} open={open} anchorEl={anchorEl} transition>
{({ TransitionProps }) => ( // <---- This calling function which lets you pass the data to components provided by user
<Fade {...TransitionProps}>
<div className={classes.paper}>The content of the Popper.</div>
</Fade>
)}
</Popper>
<Popper id={id} open={open} anchorEl={anchorEl} transition>
{({ TransitionProps }) => ( // <---- This calling function which lets you pass the data to components provided by user
<Fade {...TransitionProps}>
<div className={classes.paper}>The content of the Popper.</div>
</Fade>
)}
</Popper>
3 replies
TTCTheo's Typesafe Cult
Created by sen.py on 10/7/2022 in #questions
MUI v4 + TailwindCSS OR MUI v5?
Currently have entire dashboard in MUI v4, do you think will it be good to start mixing tailwind on top of it or just go MUI v5?
14 replies