19 lines
335 B
TypeScript
19 lines
335 B
TypeScript
|
const ensureDir = async (name: string) => {
|
||
|
if (
|
||
|
!(await Deno.stat(name)
|
||
|
.then(() => true)
|
||
|
.catch(() => false))
|
||
|
) {
|
||
|
await Deno.mkdir(name);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
try {
|
||
|
await Deno.remove("./tmp", { recursive: true });
|
||
|
} catch (err) {}
|
||
|
|
||
|
await ensureDir("./tmp");
|
||
|
await ensureDir("./data");
|
||
|
|
||
|
import "./http.ts";
|