haitam
haitam
TTCTheo's Typesafe Cult
Created by haitam on 1/11/2024 in #questions
what is the correct way to use prefix in tailwindcss
or make it look smaller ... or as a capsule
4 replies
TTCTheo's Typesafe Cult
Created by haitam on 1/11/2024 in #questions
what is the correct way to use prefix in tailwindcss
i also thought of having a vscode plugin that hides the prefix
4 replies
TTCTheo's Typesafe Cult
Created by haitam on 12/27/2023 in #questions
next auth v5 i'm getting a `invalid_grant`
nvm it worked after removing strategy: "jwt" and checks: ["none"],
3 replies
TTCTheo's Typesafe Cult
Created by haitam on 7/29/2023 in #questions
stop using prefix with tailwindcss
the creator said @apply is the worse thing he made, but infact its prefix
3 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/29/2023 in #questions
"it works on my machine" deployed app to vercel and it blew up
you can use vercel cli and link it to the project and run vercel build locally
11 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/29/2023 in #questions
"it works on my machine" deployed app to vercel and it blew up
It might also be a mistake in the environment variables which could lead to some libs causing errors
11 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/29/2023 in #questions
"it works on my machine" deployed app to vercel and it blew up
They should give more info
11 replies
TTCTheo's Typesafe Cult
Created by 低级黑小明👑 on 5/29/2023 in #questions
"it works on my machine" deployed app to vercel and it blew up
Check the logs in vercel
11 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
terminal on steroids
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
interesting.. thanks for the tips
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
for anyone intrested i made these two scripts
# ./scripts/run-production.sh
source .env

node ./out/s1/server.js
# ./scripts/run-production.sh
source .env

node ./out/s1/server.js
# ./scripts/run-build.sh
set -e
git stash
git pull
pnpm i
yarn build

rm -rf out/s2
mkdir -p "out/s1"
cp -rf out/s1 out/s2
cp -rf .next/standalone/* out/s1/
cp -rf .next/standalone/.next out/s1/
cp -rf .next/static out/s1/.next
# ./scripts/run-build.sh
set -e
git stash
git pull
pnpm i
yarn build

rm -rf out/s2
mkdir -p "out/s1"
cp -rf out/s1 out/s2
cp -rf .next/standalone/* out/s1/
cp -rf .next/standalone/.next out/s1/
cp -rf .next/static out/s1/.next
NOTES: - add output: "standalone" in the next.config,js - make sure all your images are imported and not just in the public folder and being referenced if you are referencing them to get the background image working in a div you can actually import it and instead of padding it directly, it has a property called src, which is what you need. ex:
import bg from "../../../../public/images/bg.png";
// make sure paths are relative and doesn't use the fancy ts path like @/public.. etc
import bgLight from "../../../../public/images/bg-light.png";

export default function Hero() {
const { theme } = useGlobal();
return (
<div
className="hero min-h-screen"
style={{
backgroundImage:
theme === "dark"
? `url(${bg.src})`
: `url(${bgLight.src})`,
}}
/>
}
import bg from "../../../../public/images/bg.png";
// make sure paths are relative and doesn't use the fancy ts path like @/public.. etc
import bgLight from "../../../../public/images/bg-light.png";

export default function Hero() {
const { theme } = useGlobal();
return (
<div
className="hero min-h-screen"
style={{
backgroundImage:
theme === "dark"
? `url(${bg.src})`
: `url(${bgLight.src})`,
}}
/>
}
- make sure you ignore the out file. - if at any point your build fails and somehow lost s1 (in the out folder). you can copy what's on s2 into s1 s2 represents the last successful build.
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
thank you soo much for your help
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
a meeting came up. i will be active in few minutes
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
.nextjs folder doesn't have a server.js
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
i already have ssh/git setup soo yeah
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
and build it in the server
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
or i can just upload the docerfile in github
36 replies
TTCTheo's Typesafe Cult
Created by haitam on 5/12/2023 in #questions
How do you self host your projects in a vps
i haven't pushed to a docker repo before, is it public?
36 replies