From d9b01c42df21127065ecff4b4d5fbfc2dfa383bd Mon Sep 17 00:00:00 2001 From: yinxue <2643126914@qq.com> Date: Tue, 9 Dec 2025 15:47:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E7=AB=AF=E5=8F=A3=E5=B9=B6=E5=B0=9D=E8=AF=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 8 +++---- .gitea/workflows/dependabot.yml | 7 ------ .gitea/workflows/lint.yaml | 41 ++++++++++++++++++++++++++++++++ public/favicon.ico | Bin 4286 -> 0 bytes server.js | 14 +++++------ 5 files changed, 51 insertions(+), 19 deletions(-) delete mode 100644 .gitea/workflows/dependabot.yml create mode 100644 .gitea/workflows/lint.yaml delete mode 100644 public/favicon.ico diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fd41ed6..272509a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,9 @@ - { "name": "Node.js", "image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye", - + "forwardPorts": [ + 3000 + ], "customizations": { "vscode": { "settings": {}, @@ -11,7 +12,6 @@ ] } }, - "portsAttributes": { "3000": { "label": "Hello Remote World", @@ -19,4 +19,4 @@ } }, "postAttachCommand": "yarn install && npm run debug" -} +} \ No newline at end of file diff --git a/.gitea/workflows/dependabot.yml b/.gitea/workflows/dependabot.yml deleted file mode 100644 index 1f79a6f..0000000 --- a/.gitea/workflows/dependabot.yml +++ /dev/null @@ -1,7 +0,0 @@ -# For more details, see https://containers.dev/guide/dependabot -version: 2 -updates: - - package-ecosystem: "devcontainers" - directory: "/" - schedule: - interval: weekly \ No newline at end of file diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..4e80842 --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,41 @@ +name: Code Linting + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + +jobs: + lint: + name: Lint JavaScript Code + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Check for syntax errors + run: node -c server.js + + - name: Run ESLint (if configured) + run: | + if [ -f ".eslintrc.json" ] || [ -f ".eslintrc.js" ] || [ -f "eslint.config.js" ]; then + npx eslint . --ext .js + else + echo "ESLint not configured, skipping..." + fi + continue-on-error: true diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index df36fcfb72584e00488330b560ebcf34a41c64c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S diff --git a/server.js b/server.js index 059e853..7e72932 100644 --- a/server.js +++ b/server.js @@ -1,12 +1,13 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ +/* + * Copyright (c) Mengning Software. 2025. All rights reserved. + * Authors: DevStar Team, + * Create: 2025-12-09 + * Description: TODO + */ 'use strict'; const express = require('express'); -const path = require('path'); // Constants const PORT = 3000; @@ -17,8 +18,5 @@ app.get('/', (req, res) => { res.send('Hello remote world!\n'); }); -// 提供 favicon.ico 静态资源 -app.use('/favicon.ico', express.static(path.join(__dirname, 'favicon.ico'))); - app.listen(PORT, HOST); console.log(`Running on http://${HOST}:${PORT}`); \ No newline at end of file