From fba253940915dff1c6fa4683abc10a986cae718b Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Thu, 17 Jul 2025 09:26:08 +0000 Subject: [PATCH] Update README.md --- README.en.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 README.en.md create mode 100644 README.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..06ef87b --- /dev/null +++ b/README.en.md @@ -0,0 +1,50 @@ + + +# Node.js Cache Demo + +This is a simple Node.js demonstration project for testing the `node_modules` caching functionality. It builds a basic HTTP service using Express and relies on the `lodash` and `moment` libraries to generate random data and format timestamps. + +## Features + +- Provides HTTP service using Express +- Uses Lodash to generate random numbers +- Uses Moment to format timestamps +- Offers a simple JSON response API + +## Installation + +Ensure that you have [Node.js](https://nodejs.org) and npm installed. Then run the following command to install dependencies: + +```bash +npm install +``` + +## Usage + +Start the server: + +```bash +npm start +``` + +Visit `http://localhost:3000` to see the response: + +```json +{ + "message": "Hello from Node.js Cache Demo!", + "timestamp": "2023-10-01 12:34:56", + "randomNumbers": [4, 8, 15, 16, 23] +} +``` + +## Build Script + +You can use the following command to build the project: + +```bash +npm run build +``` + +## License + +This project uses the MIT License. For details, please refer to the [LICENSE](LICENSE) file. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..499d8bb --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# Node.js 缓存演示 + +这是一个简单的 Node.js 演示项目,用于测试 `node_modules` 缓存功能。该项目使用 Express 构建了一个基本的 HTTP 服务,并依赖 `lodash` 和 `moment` 库来生成随机数据和格式化时间戳。 + +## 特性 + +- 使用 Express 提供 HTTP 服务 +- 使用 Lodash 生成随机数 +- 使用 Moment 格式化时间戳 +- 提供简单的 JSON 响应接口 + +## 安装 + +确保你已经安装了 [Node.js](https://nodejs.org) 和 npm。然后运行以下命令安装依赖: + +```bash +npm install +``` + +## 使用 + +启动服务: + +```bash +npm start +``` + +访问 `http://localhost:3000` 查看响应: + +```json +{ + "message": "Hello from Node.js Cache Demo!", + "timestamp": "2023-10-01 12:34:56", + "randomNumbers": [4, 8, 15, 16, 23] +} +``` + +## 构建脚本 + +你可以使用以下命令构建项目: + +```bash +npm run build +``` + +## 许可证 + +该项目使用 MIT 许可证。详情请查看 [LICENSE](LICENSE) 文件。 \ No newline at end of file -- Gitee