mirror of
https://github.com/ION606/argo-temp.git
synced 2026-05-15 04:16:53 +00:00
added initial istio BLAHAJ code
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
const serveFile = (path) => new Response(Bun.file(path));
|
||||
|
||||
const server = Bun.serve({
|
||||
port: Number(process.env.PORT || 8080),
|
||||
async fetch(req) {
|
||||
const url = new URL(req.url);
|
||||
if (url.pathname === '/') return serveFile('./public/index.html');
|
||||
if (url.pathname.startsWith('/static/')) {
|
||||
return serveFile(`.${url.pathname}`);
|
||||
}
|
||||
|
||||
return serveFile('./public/index.html');
|
||||
},
|
||||
});
|
||||
|
||||
console.log(`reef listening on ${server.port};`);
|
||||
Reference in New Issue
Block a user