diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..aae3e937e072bf619a3f6bf8945f4f70b866b6c1 --- /dev/null +++ b/README.en.md @@ -0,0 +1,62 @@ +# Express API Project + +This is an API project built with the Express framework, primarily used for managing articles, users, courses, and other content. The project uses Sequelize ORM to interact with a MySQL database and JWT for authentication. + +## Technology Stack + +- **Node.js** +- **Express** +- **Sequelize ORM** +- **MySQL** +- **JWT (JSON Web Tokens)** +- **Bcrypt.js (for password encryption)** + +## Functional Modules + +- **Article Management**: Supports creating, reading, updating, and deleting articles. +- **User Management**: Includes user information management and authentication. +- **Course Management**: Supports managing courses and chapters. +- **Category Management**: Used for managing categories of articles or courses. +- **Settings Management**: Provides system configuration functionality. +- **Data Visualization**: Offers data visualization features. +- **Authentication**: Implements admin authentication using JWT. + +## Installation and Running + +### Install Dependencies + +```bash +npm install +``` + +### Start the Project + +```bash +npm start +``` + +This will start the project using `nodemon` and watch for changes in the development environment. + +## Directory Structure + +- **app.js**: Entry file for the Express application. +- **config/config.json**: Database configuration file. +- **routes/**: Contains all API routes. +- **controllers/**: Handles business logic. +- **models/**: Defines database models. +- **middlewares/**: Contains middleware, such as authentication. +- **migrations/**: Database migration files. +- **seeders/**: Database seed files for initializing data. +- **utils/**: Contains utility functions for error handling and responses. + +## Environment Variables + +The project uses a `.env` file to configure environment variables. Please ensure to create and configure the `.env` file before running the project. + +## Contribution + +Code contributions and issue reports are welcome. Please ensure that your code follows the project's coding standards and that all tests pass before submitting a pull request (PR). + +## License + +This project is licensed under the MIT License. For more 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..94f9335ce20e816428433ce5b80328e17eadb6db --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# Express API 项目 + +这是一个基于 Express 框架构建的 API 项目,主要用于管理文章、用户、课程等内容。该项目使用了 Sequelize ORM 来操作 MySQL 数据库,并使用 JWT 进行身份验证。 + +## 技术栈 + +- **Node.js** +- **Express** +- **Sequelize ORM** +- **MySQL** +- **JWT (JSON Web Tokens)** +- **Bcrypt.js (用于密码加密)** + +## 功能模块 + +- **文章管理**:支持文章的增删改查操作。 +- **用户管理**:包括用户信息管理及身份验证。 +- **课程管理**:支持课程和章节的管理。 +- **分类管理**:用于管理文章或课程的分类。 +- **设置管理**:提供系统设置功能。 +- **图表展示**:提供数据可视化功能。 +- **身份验证**:使用 JWT 实现管理员身份验证。 + +## 安装与运行 + +### 安装依赖 + +```bash +npm install +``` + +### 启动项目 + +```bash +npm start +``` + +这将使用 `nodemon` 启动项目,并监听开发环境的变化。 + +## 目录结构 + +- **app.js**:Express 应用的入口文件。 +- **config/config.json**:数据库配置文件。 +- **routes/**:包含所有 API 路由。 +- **controllers/**:处理业务逻辑。 +- **models/**:定义数据库模型。 +- **middlewares/**:包含中间件,如身份验证。 +- **migrations/**:数据库迁移文件。 +- **seeders/**:数据库种子文件,用于初始化数据。 +- **utils/**:包含错误处理和响应工具函数。 + +## 环境变量 + +项目使用 `.env` 文件来配置环境变量,确保在运行项目前创建并配置好 `.env` 文件。 + +## 贡献 + +欢迎贡献代码和报告问题。请在提交 PR 前确保代码符合规范,并通过所有测试。 + +## 许可证 + +该项目使用 MIT 许可证。详情请查看 [LICENSE](LICENSE) 文件。 \ No newline at end of file