Trying deploy

This commit is contained in:
saqut 2024-01-28 03:31:08 +03:00
parent 2d19a8842f
commit 3f5c875cf1
4 changed files with 33 additions and 11 deletions

11
public/index.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h2>Hello !</h2>
</body>
</html>

View File

@ -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');
require("./server/http.js");

7
server/http.js Normal file
View File

@ -0,0 +1,7 @@
const express = require("express");
const app = express();
app.listen(6480,'0.0.0.0');
exports.app = app;

14
server/public.js Normal file
View File

@ -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
}
)
);