diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..06ef87bc42a5effc2a002f965438ffb10db7e9dd --- /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 0000000000000000000000000000000000000000..499d8bb98908f3bf1e458655b96508f3cc4b4751 --- /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