init(project) structure
This commit is contained in:
10
server.js
Normal file
10
server.js
Normal file
@@ -0,0 +1,10 @@
|
||||
export default {
|
||||
port: 80,
|
||||
fetch(req) {
|
||||
const url = new URL(req.url)
|
||||
if(url.pathname == '/') return new Response(Bun.file('./index.html'));
|
||||
if(url.pathname == '/main.js') return new Response(Bun.file('./main.js'));
|
||||
if(url.pathname == '/cetra.js') return new Response(Bun.file('./cetra/Cetra.js'));
|
||||
return new Response('ERR 404: Not Found', { status: 404 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user