mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
* Improve support for \`debug-adapter-protocol\` * More improvements, fix formatting in debug console * Fix attaching * Prepare for source maps * Start of source map support, breakpoints work * Source map support * add some package.jsons * wip * Update package.json * More fixes * Make source maps safer if exception occurs * Check bun version if it fails * Fix console.log formatting * Fix source maps partly * More source map fixes * Prepare for extension * watch mode with dap * Improve preview code * Prepare for extension 2 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
64 lines
988 B
JavaScript
64 lines
988 B
JavaScript
// @bun
|
|
const express = import.meta.require("express");
|
|
const app = express();
|
|
import { readFile } from "node:fs/promises";
|
|
|
|
app
|
|
.get("/", (req, res) => {
|
|
console.log("I am logging a request!??");
|
|
readFile(import.meta.path, "utf-8").then(data => {
|
|
console.log(data.length);
|
|
debugger;
|
|
res.send("hello world");
|
|
});
|
|
})
|
|
.listen(3000);
|
|
|
|
const va = 1;
|
|
let vb = 2;
|
|
var vc = 3;
|
|
|
|
function fa() {
|
|
fb();
|
|
}
|
|
|
|
function fb() {
|
|
fc();
|
|
}
|
|
|
|
function fc() {
|
|
fd();
|
|
}
|
|
|
|
function fd() {
|
|
let map = new Map([
|
|
[1, 2],
|
|
[2, 3],
|
|
[3, 4],
|
|
]);
|
|
let set = new Set([1, 2, 3, 4, 5]);
|
|
let arr = [1, 2, 3, 4, 5];
|
|
let obj = {
|
|
a: 1,
|
|
b: 2,
|
|
c: 3,
|
|
};
|
|
function fd1() {
|
|
let date = new Date();
|
|
console.log(new Error().stack);
|
|
debugger;
|
|
console.log(date);
|
|
}
|
|
fd1();
|
|
}
|
|
|
|
Bun.serve({
|
|
port: 9229,
|
|
inspector: true,
|
|
development: true,
|
|
fetch(request, server) {
|
|
// console.log(request);
|
|
return new Response(request.url);
|
|
},
|
|
});
|