Elysia.js + Drizzle ORM + Cloudflare + Vue.js full-stack template, a webapp allows you to get a random Elysia artwork 🎶.
git clone https://github.com/nick-cjyx9/Random-Elysia.git
cd Random-Elysia
bun install
- Create a d1 database
bun wrangler d1 create <name>
-
Configure the
.env
andwrangler.toml
file -
Migrate the database
bun db:generate
bun db:migrate
Then you can run the dev server by bun frontend:dev
and bun backend:dev
, or deploy the app by bun frontend:deploy
and bun backend:deploy
.
It's a bit complex to debug the D1 database locally, cause wrangler creates a .sqlite
file locally for wrangler dev
, that means we need to apply migrations to the .sqlite
file at the same time. So I prefer to deploy backend and debug the remote database. If any one can provide a better way to debug the D1 database locally, please let me know through issue or discussions.
We can start Drizzle Studio UI to easily manage the database.
bun db:studio
We use Cloudflare AI's model to auto tag our images.
prompt: Please describe the pink hair girl's expression using one or several of these words which you think is most correct: excited, happy, surprised, fear, sad, shy, disappointed, angry, neutral.
You can debug the prompt in the Cloudflare Multi-model Playground
Novel and popular js runtime. All is well, but bun add
is too slow that I can enjoy a cup of coffee during
installing deps.
We use Cloudflare AI's model to detect porn images. And the abuse will be immediately banned and sent to admin's email.
Give a ⭐️ if this project helped you!
我永远喜欢爱莉希雅!