How to start an Express server in best practice?

I have an Express REST API server written in TypeScript.

At first, I started server like this –

const initServer = async() => {   await connectDb();   await server.listen(secrets.port, secrets.hostname, () => {     logger.info(           `Running server at http://$  {secrets.hostname}:$  {secrets.port} in $  {             secrets.env           } env and API version is $  {secrets.apiVersion}`         );   }); } initServer().catch(error => logger.error(`Init server went wrong with: $  {error}`)); 

Then I read a blog post suggesting to use .then().catch()

async function initServer() {   // Connect the database first   await connectDb()     .then(() =>       // then start the server       server.listen(secrets.port, secrets.hostname, () => {         logger.info(           `Running server at http://$  {secrets.hostname}:$  {secrets.port} in $  {             secrets.env           } env and API version is $  {secrets.apiVersion}`         );       })     )     .catch(err => {       logger.error(`Initializing server went wrong with: $  {err}`);       process.exit(1);     }); } 

Then I read another blog post saying “catch the error first” –

async function initServer() {   // Connect the database first   await connectDb()     // then start the server     .then(() => server.listen(secrets.port, secrets.hostname))     .catch(err => {       logger.error(`Initializing server went wrong with: $  {err}`);       process.exit(1);     })     // then announce the server info     .finally(() => {       logger.info(         `Running server at http://$  {secrets.hostname}:$  {secrets.port} in $  {           secrets.env         } env and API version is $  {secrets.apiVersion}`       );     }); } 

But I feel like I’m not doing it right. Please educate me what I’m doing wrong.

How should I start the server?