Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arafipro/lucia-auth-base-app
Lucia auth/Username and password authの最低限の機能を実装
https://github.com/arafipro/lucia-auth-base-app
bun cloudflare-d1 cloudflare-pages drizzle-orm lucia-auth nextjs typescript
Last synced: 14 days ago
JSON representation
Lucia auth/Username and password authの最低限の機能を実装
- Host: GitHub
- URL: https://github.com/arafipro/lucia-auth-base-app
- Owner: arafipro
- Created: 2024-08-29T08:27:53.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-31T08:12:12.000Z (4 months ago)
- Last Synced: 2024-11-02T20:26:07.788Z (2 months ago)
- Topics: bun, cloudflare-d1, cloudflare-pages, drizzle-orm, lucia-auth, nextjs, typescript
- Language: TypeScript
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lucia auth
Username and password authの最低限の機能を実装
https://lucia-auth.com/
## 技術選定
- Bun
- TypeScript
- Next.js
- Drizzle
- Lucia auth
- Cloudflare Pages
- Cloudflare D1## 初期設定
### NodeModule をインストール
```bash
bun install
```### データベースを作成
```bash
npx wrangler d1 create lucia-auth-base-app
```### wrangler.toml に追記
```toml
[[d1_databases]]
binding = "DB"
database_name = "lucia-auth-base-db"
database_id = ""
`````はデータベースを作成したときに出力されるID
### テーブルのスキーマを作成
```bash
npx drizzle-kit generate
```### ローカルデータベースにテーブルを作成
```bash
npx wrangler d1 migrations apply lucia-auth-base-db --local
```### リモートデータベースにテーブルを作成
```bash
npx wrangler d1 migrations apply lucia-auth-base-db --remote
```