diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000000000000000000000000000000000000..10e6b643f9221f0c7b242bdf1cc799479392736e --- /dev/null +++ b/html/index.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + 你好2224444 + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000000000000000000000000000000000000..8b77371b96004f48c5f7dc53adbaa15793f19210 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + + 网页 + + + 你好111 + + \ No newline at end of file diff --git a/index.js b/index.js index b83fa0a82d8c43460818d4cf50cec3f104d26ed8..42379f6414a7370859aa6e35e49b6a1a390a6698 100644 --- a/index.js +++ b/index.js @@ -8,8 +8,6 @@ function 计算当前月一共有几天() { return daysInMonth; } -const days = 计算当前月一共有几天(); -console.log(`本月一共${days}天`); // 输出当前月份的天数 function getDayOfMonth() { const today = new Date(); @@ -20,6 +18,12 @@ function getDayOfMonth() { const diffDays = Math.ceil(diffMs / (1000 * 60 * 60 * 24)); return diffDays; } + +console.log(`当前月份:${new Date().getMonth() + 1}`) + +const days = 计算当前月一共有几天(); +console.log(`本月一共${days}天`); // 输出当前月份的天数 + const dayOfMonth = getDayOfMonth(); console.log(`今天是本月的第 ${dayOfMonth} 天`); diff --git a/package.json b/package.json index 72caa1750a1c44c18460a496d258fbd3c51c673a..66bbecd16416353e33576b411ad3438b22ce23b0 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,15 @@ "description": "", "main": "index.js", "scripts": { - "dev": "node index.js", - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "node index.js", + "http": "http-server -p 80" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "@types/node": "^18.0.6", - "node-fetch": "^3.2.6" + "@types/node": "^18.0.6", + "http-server": "^14.1.1", + "node-fetch": "^3.2.6" } - } - \ No newline at end of file +}