コード生成して欲しいです。
CRUD アプリ、
バックエンド: Hono.js , D1 database
フロントエンド: React, tailwindCSS 使用したいです。
・バックエンドのみ、生成してほしい。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Route } from "./+types/home"; | |
import { Form , useSubmit } from "react-router"; | |
import { useState , useEffect } from "react"; | |
import { z } from "zod"; | |
export function meta({}: Route.MetaArgs) { | |
return [ | |
{ title: "New React Router App" }, | |
{ name: "description", content: "Welcome to React Router!" }, | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Route } from "./+types/home"; | |
import { Form , useSubmit } from "react-router"; | |
export function meta({}: Route.MetaArgs) { | |
return [ | |
{ title: "New React Router App" }, | |
{ name: "description", content: "Welcome to React Router!" }, | |
]; | |
} | |
export async function loader({ params }: Route.LoaderArgs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian | |
RUN apt-get update && apt-get install -y \ | |
zip \ | |
unzip \ | |
curl | |
WORKDIR /work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Client } from 'pg'; | |
interface Todo { | |
id?: string; | |
title: string; | |
content: string; | |
userId: number; | |
completed: number; | |
createdAt?: Date; | |
updatedAt?: Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pool } from 'pg'; | |
// PostgreSQLの接続設定 | |
const pool = new Pool({ | |
user: 'your_username', | |
host: 'localhost', | |
database: 'your_database', | |
password: 'your_password', | |
port: 5432, | |
}); |
NewerOlder