StrangeBytes's picture
Upload 8 files
8ebe2ad verified
Raw History Blame Contribute Delete
467 Bytes
const files: Record<string, string> = {
'/': 'dist/index.html',
'/index.html': 'dist/index.html',
'/app.js': 'dist/app.js',
'/style.css': 'dist/style.css',
}
Bun.serve({
port: 4173,
fetch(request) {
const path = files[new URL(request.url).pathname]
return path ? new Response(Bun.file(new URL(path, import.meta.url))) : new Response('Not found', {status: 404})
},
})
console.log('Character builder: http://localhost:4173')