Additionally, I've created these scripts (ugly but saves time) in `package.json` ```json "scripts":

Additionally, I've created these scripts (ugly but saves time) in package.json
"scripts": {
  "build": "npx vite build",
  "watch": "npx vite build --watch",
  "serve": "npx wrangler pages dev dist --port 8080 --show-interactive-dev-session false",
  "dev": "npx npm-run-all --serial build serve --parallel watch",
  "migrations:create": "npx wrangler d1 migrations create DB",
  "migrations:list:local": "npx wrangler d1 migrations list DB --local",
  "migrations:list:preview": "npx wrangler d1 migrations list DB --remote --preview",
  "migrations:list:production": "npx wrangler d1 migrations list DB --remote",
  "migrations:apply:local": "npx wrangler d1 migrations apply DB --local",
  "migrations:apply:preview": "npx wrangler d1 migrations apply DB --remote --preview",
  "migrations:apply:production": "npx wrangler d1 migrations apply DB --remote",
  "sql:query:local": "npx wrangler d1 execute DB -y --local --command",
  "sql:query:preview": "npx wrangler d1 execute DB -y --remote --preview --command",
  "sql:query:production": "npx wrangler d1 execute DB -y --remote --command",
  "sql:file:local": "npx wrangler d1 execute DB -y --local --file",
  "sql:file:preview": "npx wrangler d1 execute DB -y --remote --preview --file",
  "sql:file:production": "npx wrangler d1 execute DB -y --remote --file"
}
Was this page helpful?