gradio/ui/playwright-setup.js
pngwn 817819d7a1
Fix the types (#1843)
* fix types

* fail CI when typechecking fails

* maybe fix

* more fix

* remove all rferences to theme

* fix login
2022-07-21 19:12:46 +01:00

22 lines
525 B
JavaScript

import polka from "polka";
import sirv from "sirv";
import path from "path";
import { dirname } from "path";
import { fileURLToPath } from "url";
const __dirname = dirname(fileURLToPath(import.meta.url));
const template = path.join(__dirname, "..", "gradio", "templates", "frontend");
export default async function global_setup() {
const serve = sirv(template);
const app = polka()
.use(serve)
.listen("3000", () => {
console.log(`> Running on localhost: 3000`);
});
return () => {
app.server.close();
};
}