gradio/.config/playwright-setup.js
pngwn ae4277a9a8
move files (#3605)
* move files

* commit the rest of the files

* fix lockfile

* fix workflow

* fix type errors

* fix tests

* only run ci when certain files change

* run correct test command in ci

* version

* fix pypi script

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-27 16:12:58 -07: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("9876", () => {
console.log(`> Running on localhost: 9876`);
});
return () => {
app.server.close();
};
}