Add CYD browser flasher with Next.js, i18n, and Web Serial install.
Replace the starter app with a public/local flasher that discovers sibling firmwares, supports en/zh, and documents HTTPS deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
13
app/api/firmware/route.ts
Normal file
13
app/api/firmware/route.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { discoverFirmware } from "@/lib/firmware";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export async function GET() {
|
||||
const firmwares = discoverFirmware();
|
||||
return NextResponse.json({
|
||||
chipFamily: "ESP32",
|
||||
count: firmwares.length,
|
||||
firmwares,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user