Skip to content

Commit

Permalink
chore: remove unused console
Browse files Browse the repository at this point in the history
  • Loading branch information
couriourc committed Sep 8, 2024
1 parent 88fa40d commit 9b6ba24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 10 additions & 2 deletions example/xxxServer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@
<link rel="stylesheet" href="./bootstrap.min.css"/>
<script src="./jquery.min.js"></script>
<script>
const result = [];
const $preview = $("#preview");
const reset = () => $preview.html('') ;
const loading = ()=> $preview.html(`
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
`)
function getInfo() {
fetch('/api/').then(d => d.json()).then((d) => {
document.getElementById('preview').innerHTML +=
`<li class="list-group-item">${JSON.stringify(d)}</li>`;
reset();
result.forEach();
});
}
</script>
Expand Down
1 change: 0 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ for await (const file of glob.scan(resolve(config.api_dir))) {
const finalUrl = urlRewrite(url, method,);
app[method]?.(finalUrl, async (req) => {
let res = Bun.file(resolve(path.join(config.api_dir, file)));
console.log(req)
logger.debug(JSON.stringify(pick(req, ['cookie', 'user-agent', 'headers', 'body', 'route', 'query', 'content-type'])));
switch (path.extname(file)) {
case ".json":
Expand Down

0 comments on commit 9b6ba24

Please sign in to comment.