Spaces:
Sleeping
Sleeping
Commit
·
f7c1a11
1
Parent(s):
8e97867
refactor: directly use app.listen
Browse files- src/index.ts +4 -9
src/index.ts
CHANGED
@@ -1,10 +1,5 @@
|
|
1 |
-
import { app } from "./configs/app"
|
2 |
-
import http from 'http';
|
3 |
-
|
4 |
-
const server = http.createServer(app);
|
5 |
-
|
6 |
-
server.listen(process.env.PORT || 4000, () => {
|
7 |
-
console.log(`Server is up and runing on port ${process.env.PORT}!`)
|
8 |
-
})
|
9 |
-
|
10 |
|
|
|
|
|
|
|
|
1 |
+
import { app } from "./configs/app";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
app.listen(process.env.PORT || 4000, () => {
|
4 |
+
console.log(`Server is up and runing on port ${process.env.PORT}!`);
|
5 |
+
});
|