Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added server debug information to double check the amount of workers #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ async function main(options) {

server.use(express.static(wwwroot))

console.log("Debug information:")
Copy link
Member

@Potherca Potherca Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in favor of adding something to logging when the server starts, and I think this is a good start!1

To distinguish from development "logs", I would prefer if process.stdout were used.2

process.stdout.write(`"Debug information:"
maxworkers: ", maxWorkers
)

Footnotes

  1. @poef Is there any other information that is also relevant to output here?

  2. Maybe good to know, console.log uses process (stdout or stderr, depending on use-case)` itself.

console.log("maxworkers: ", maxWorkers)

// allow access to raw body, used to parse a query send as post body
server.use(express.raw({
type: (req) => true, // parse body on all requests
Expand Down