.catch(emptyFunction)
})
-expressApp.listen(port, () => {
- console.info(
- `⚡️[express server]: Express server is started at http://localhost:${port}/`
- )
-})
+try {
+ expressApp.listen(port, () => {
+ console.info(
+ `⚡️[express server]: Express server is started at http://localhost:${port}/`
+ )
+ })
+} catch (err) {
+ console.error(err)
+ process.exit(1)
+}