H
H
Explore posts from servers
DTDrizzle Team
Created by H on 7/28/2024 in #help
How can we get all tables names
So i want to get all tables names i have in my schema.ts found this https://orm.drizzle.team/docs/goodies#get-table-information but it doesnt fit my use case
6 replies
TTCTheo's Typesafe Cult
Created by H on 2/24/2024 in #questions
deploying next to a VPS + static files to a cdn
im deploying a next app to a VPS using github action and in my next config ts im adding the output: standalone as mentionned in the doc it will generate a minimal build that i export to the vps and they let you handle the assests and public to deploy them to a cdn my question is how can i deploy only the static files to the cdn from the github actions here is my ci im running for the deployement on vps
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3

- name: ⚙️ Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: 🍞 Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 📦 Install dependencies w/bun
run: bun install --frozen-lockfile
- name: 🏗️ Build for production
run: npm run build

- name: 📂 Copy dist to VPS
uses: appleboy/scp-action@master
with:
host: ${{ vars.HOST }}
username: ${{ vars.USERNAME }}
key: ${{ vars.PRIVATE_KEY }}
port: 22
source: "next.config.js,node_modules,.next,package.json,.env,public,ecosystem.json"
target: "~/jozdan-app"

- name: 🚀 Deploy to server using SSH
uses: appleboy/ssh-action@master
with:
host: ${{ vars.HOST }}
username: ${{ vars.USERNAME }}
key: ${{ vars.PRIVATE_KEY }}
port: 22
script: |
pm2 restart jozdan-app
pm2 save
sudo systemctl restart nginx
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3

- name: ⚙️ Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: 🍞 Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 📦 Install dependencies w/bun
run: bun install --frozen-lockfile
- name: 🏗️ Build for production
run: npm run build

- name: 📂 Copy dist to VPS
uses: appleboy/scp-action@master
with:
host: ${{ vars.HOST }}
username: ${{ vars.USERNAME }}
key: ${{ vars.PRIVATE_KEY }}
port: 22
source: "next.config.js,node_modules,.next,package.json,.env,public,ecosystem.json"
target: "~/jozdan-app"

- name: 🚀 Deploy to server using SSH
uses: appleboy/ssh-action@master
with:
host: ${{ vars.HOST }}
username: ${{ vars.USERNAME }}
key: ${{ vars.PRIVATE_KEY }}
port: 22
script: |
pm2 restart jozdan-app
pm2 save
sudo systemctl restart nginx
2 replies
TTCTheo's Typesafe Cult
Created by H on 9/7/2023 in #questions
embed parts from websites on a whiteboard
anyone has an idea or guidance on how to embed live parts of websites on a whiteboard (by taking a screenshot of the part you want) easels on the arc browser have this feature https://www.youtube.com/watch?v=ukquBSOpmTk&ab_channel=TheBrowserCompany
2 replies
TTCTheo's Typesafe Cult
Created by H on 7/28/2023 in #questions
remap a command of vim inside vscode
Hey how can i remap this command of vim "va{V" for selecting a functions this is what i tried but it not working:
{
"key": "<leader>vf",
"command": "vim.remap",
"when": "vim.mode == 'Normal'",
"args": {
"command": "va{V",
}
}
{
"key": "<leader>vf",
"command": "vim.remap",
"when": "vim.mode == 'Normal'",
"args": {
"command": "va{V",
}
}
2 replies
TTCTheo's Typesafe Cult
Created by H on 6/20/2023 in #questions
youtube videos blur effect
5 replies
TTCTheo's Typesafe Cult
Created by H on 6/20/2023 in #questions
Ui component name
5 replies
TTCTheo's Typesafe Cult
Created by H on 6/17/2023 in #questions
vercel ai sdk with pages folder
can we use vercel ai sdk with pages folder since it streaming response
2 replies
TTCTheo's Typesafe Cult
Created by H on 6/15/2023 in #questions
nextauth with external api
out of curiousity is sending the id of user in a cookie and then querying the db the only way when we want to get user data on an external api knowing that i managed auth with nextauth
2 replies
TTCTheo's Typesafe Cult
Created by H on 6/7/2023 in #questions
blocked vercel account
how can i unblock my vercel account apprently i overused image optimization
7 replies
TTCTheo's Typesafe Cult
Created by H on 3/23/2023 in #questions
Sending file (image/video) to trpc procedure
Hi anyone have a clue on how i can send an image/video to trpc procedure to upload it to google drive from there i tried to do it directly from front but since i need access to fs i couldnt if you have another way to save a video to google drive in nextjs i would love to know it
33 replies
TTCTheo's Typesafe Cult
Created by H on 3/23/2023 in #questions
SignIn discord user if he is on a certain Server
Hi im wondering if there is a way in NextAuth to sign user only if they are on a specific server otherswise redirect them to signin page
8 replies
TTCTheo's Typesafe Cult
Created by H on 3/23/2023 in #questions
tRPC Error handling
4 replies
TTCTheo's Typesafe Cult
Created by H on 2/12/2023 in #questions
file structure in react query
hello i wanted to know opinionated file structures for RQ im a rtk query users wanted to jump in RQ but i want to know before a good structuring that can scale if you have repos,blogs, or just your opinions about it i would love that
14 replies
TTCTheo's Typesafe Cult
Created by H on 2/2/2023 in #questions
create t3 app with pnpm issue
9 replies
TTCTheo's Typesafe Cult
Created by H on 10/12/2022 in #questions
is there a way to typesafety in Swagger Ui
i wonder if there is a way to write api's docs with swagger with typesafety in it ? of course that wouldn't be a comment , maybe an object type or somethings and the docs would be in .json and do you any alternative to write docs for an api beside swagger
1 replies
TTCTheo's Typesafe Cult
Created by H on 10/7/2022 in #questions
my VSCODE broke
27 replies
TTCTheo's Typesafe Cult
Created by H on 9/17/2022 in #questions
File Structure in T3 Stack
hello guys i wanted to know where do we put types and what the folder structure of it like for example do you put them in components/NavBar/types.d.ts or do you create a root folder /types and if you have other ways to structure types i would like to know your opinion on this
36 replies