Nov 15, 2022
You can write a async function, where you can put all startup codes snippet and make sure you load env variables at very top. You can take reference of below code snippet
```
const express = require('express');
app = express();
async function main() {
// await to load env variables from secret manager
app.listen(PORT, () => { console.log('server started') });
}
main().catch(err => { throw err; })
```
I have not checked syntax of above code. But hope this solve your problem.