chore: small code adjustment
This commit is contained in:
parent
c5e3107e03
commit
8cd9cb5901
2 changed files with 14 additions and 3 deletions
|
|
@ -6,6 +6,9 @@ import swaggerDocument from "./swagger.json";
|
|||
import error from "./middlewares/error";
|
||||
import { RegisterRoutes } from "./routes";
|
||||
|
||||
const APP_HOST = process.env.APP_HOST || "0.0.0.0";
|
||||
const APP_PORT = +(process.env.APP_PORT || 3000);
|
||||
|
||||
(async () => {
|
||||
const app = express();
|
||||
|
||||
|
|
@ -19,8 +22,5 @@ import { RegisterRoutes } from "./routes";
|
|||
|
||||
app.use(error);
|
||||
|
||||
const APP_HOST = process.env.APP_HOST || "0.0.0.0";
|
||||
const APP_PORT = +(process.env.APP_PORT || 3000);
|
||||
|
||||
app.listen(APP_PORT, APP_HOST, () => console.log(`Listening on: http://localhost:${APP_PORT}`));
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue