Skip to content

What's the best way to setup ExpressJS for GoAccess? #2455

Answered by breck7
breck7 asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind! I found the solution: use morgan: https://github.com/expressjs/morgan

I deleted my custom function and replaced with:

app.use(morgan("combined", { stream: fs.createWriteStream(requestLog, { flags: "a" }) }))

morgan is perfect. The other logging middleware for node.js express were bloated.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@allinurl
Comment options

Answer selected by breck7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants