diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..e8a6749 --- /dev/null +++ b/public/index.html @@ -0,0 +1,11 @@ + + + + + + Document + + +

Hello !

+ + \ No newline at end of file diff --git a/server.js b/server.js index 53ff525..ee8af7e 100644 --- a/server.js +++ b/server.js @@ -1,11 +1 @@ -const express = require("express"); - - -const app = express(); - -app.get("/",function(request, response){ - response.end("Merhaba") -}) - - -app.listen(6480,'0.0.0.0'); \ No newline at end of file +require("./server/http.js"); \ No newline at end of file diff --git a/server/http.js b/server/http.js new file mode 100644 index 0000000..124409b --- /dev/null +++ b/server/http.js @@ -0,0 +1,7 @@ +const express = require("express"); + +const app = express(); + +app.listen(6480,'0.0.0.0'); + +exports.app = app; \ No newline at end of file diff --git a/server/public.js b/server/public.js new file mode 100644 index 0000000..514a00b --- /dev/null +++ b/server/public.js @@ -0,0 +1,14 @@ +const express = require("express"); +const {resolve} = require("node:path"); +const {app} = require("./http"); + + +app.use( + express.static( + resolve(__dirname,"../public"), + { + acceptRanges: true, + etag: true + } + ) +); \ No newline at end of file