Serve static files

This commit is contained in:
abdussamedulutas 2025-12-14 23:57:33 +03:00
parent 48764d91e7
commit cf84639428
6 changed files with 1402 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.env
node_modules/

7
core/server.js Normal file
View File

@ -0,0 +1,7 @@
const express = require("express");
const Application = express();
Application.listen(3307);
exports.Application = Application;

13
core/static.js Normal file
View File

@ -0,0 +1,13 @@
const express = require("express");
const {Application} = require("./server.js");
const {resolve} = require("node:path");
Application.use(
express.static(
resolve("./public"),{
etag: true,
lastModified: false
}
)
);

4
index.js Normal file
View File

@ -0,0 +1,4 @@
require('dotenv').config({quiet:true});
require("./core/server.js");
require("./core/static.js");

1352
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

24
package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "ekoetki",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.saqut.com/saqut/ekoetki.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "commonjs",
"dependencies": {
"dotenv": "^17.2.3",
"express": "^5.2.1",
"knex": "^3.1.0",
"multer": "^2.0.2",
"mysql": "^2.18.1"
}
}