How to connect to MongoDB using Nodejs, Expressjs

I’ve been struggling with connecting db to expressjs server.
I googled for a solution and find this official doc:

The instruction is good but its js code is not specialized for nodejs(It’s using import so it’s specialized for web coding, I thought so =D)
Any idea?

Node js supports import, since many years back. What version of nodejs are you working with?