Compare commits
No commits in common. "ed8d35435d9231ac8b64fa6d6c146409732b7d89" and "745ba4d903a9ff2d7f8edf43b33155b63e3c2ca1" have entirely different histories.
ed8d35435d
...
745ba4d903
@ -1,2 +0,0 @@
|
|||||||
.git
|
|
||||||
node_modules
|
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
node_modules
|
node_modules
|
17
Dockerfile
17
Dockerfile
@ -1,17 +0,0 @@
|
|||||||
FROM node:18-alpine as base
|
|
||||||
|
|
||||||
WORKDIR /src
|
|
||||||
COPY package*.json /
|
|
||||||
EXPOSE 2428
|
|
||||||
|
|
||||||
FROM base as production
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
RUN npm ci
|
|
||||||
COPY . /
|
|
||||||
CMD ["node", "bin/www"]
|
|
||||||
|
|
||||||
FROM base as dev
|
|
||||||
ENV NODE_ENV=development
|
|
||||||
RUN npm install -g nodemon && npm install
|
|
||||||
COPY . /
|
|
||||||
CMD ["nodemon", "bin/www"]
|
|
@ -1,14 +0,0 @@
|
|||||||
version: '3.8'
|
|
||||||
services:
|
|
||||||
web:
|
|
||||||
build:
|
|
||||||
context: ./
|
|
||||||
target: dev
|
|
||||||
volumes:
|
|
||||||
- .:/src
|
|
||||||
command: npm run start:dev
|
|
||||||
ports:
|
|
||||||
- "2428:2428"
|
|
||||||
environment:
|
|
||||||
NODE_ENV: development
|
|
||||||
DEBUG: nodejs-docker-express:*
|
|
4204
package-lock.json
generated
4204
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -23,11 +23,11 @@
|
|||||||
"colors": "^1.4.0",
|
"colors": "^1.4.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"gamedig": "^2.0.23",
|
"gamedig": "^2.0.23",
|
||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^10.0.0",
|
||||||
"os": "^0.1.1",
|
"os": "^0.1.1",
|
||||||
"socket.io": "^4.5.4",
|
"socket.io": "^3.0.1",
|
||||||
"striptags": "^3.1.1",
|
"striptags": "^3.1.1",
|
||||||
"systeminformation": "^5.15.1"
|
"systeminformation": "^4.16.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^7.13.0",
|
"eslint": "^7.13.0",
|
||||||
|
@ -9,15 +9,12 @@ function handle(req, res) {
|
|||||||
"load": os.loadavg(),
|
"load": os.loadavg(),
|
||||||
"time": si.time()
|
"time": si.time()
|
||||||
};
|
};
|
||||||
si.mem(function (data) {
|
si.cpuTemperature(function (data) {
|
||||||
|
sysInfo["temp"] = data;
|
||||||
|
});
|
||||||
|
si.mem(function (data) {
|
||||||
sysInfo["mem"] = data;
|
sysInfo["mem"] = data;
|
||||||
});
|
});
|
||||||
// si.cpuTemperature(function (data) {
|
|
||||||
// sysInfo["temp"] = data;
|
|
||||||
// });
|
|
||||||
// si.mem(function (data) {
|
|
||||||
// sysInfo["mem"] = data;
|
|
||||||
// });
|
|
||||||
si.fsSize(function (data) {
|
si.fsSize(function (data) {
|
||||||
sysInfo["fs"] = data;
|
sysInfo["fs"] = data;
|
||||||
res.status(200).json(sysInfo);
|
res.status(200).json(sysInfo);
|
||||||
@ -26,4 +23,4 @@ function handle(req, res) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
handle
|
handle
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user