# upload-img-node **Repository Path**: flash1989/upload-img-node ## Basic Information - **Project Name**: upload-img-node - **Description**: nodejs上传文件,图片 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-02-17 - **Last Updated**: 2023-11-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # upload-img-node 基于nodejs+express+multer的图片上传接口 ## 简介 upload-img-node是一个简单的图片上传接口,上传文件后,会返图片在服务器上的路径。 例如: ```json { msg:"上传成功!", data:'http://localhost/asset/apple-1676433564328.jpg' } ``` ## 项目部署 ### 1,初始化node包 ```she npm i ``` ### 2,运行项目 ```she node main.js ``` ### 3,上传接口地址 项目运行起来后,就可以访问接口地址了。系统默认使用80端口。 ```txt //图片接口地址为 http://localhost/api/upload ``` 注:图片字段名为默认的 `file`