{"id":16601788,"url":"https://github.com/biyuqi/node-expresss-mongodb","last_synced_at":"2026-04-13T15:33:24.202Z","repository":{"id":96719318,"uuid":"145302614","full_name":"BiYuqi/node-expresss-mongodb","owner":"BiYuqi","description":":octocat: 实战基于vue2.x + element-ui----后台基于node + express + mongodb 前后端分离的简约商品管理,主要练习文件上传，接口编写，发布","archived":false,"fork":false,"pushed_at":"2018-08-29T16:06:31.000Z","size":6723,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-16T08:25:54.160Z","etag":null,"topics":["express","mongodb","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BiYuqi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-19T12:48:21.000Z","updated_at":"2019-08-22T05:56:03.000Z","dependencies_parsed_at":"2024-02-21T21:47:32.011Z","dependency_job_id":null,"html_url":"https://github.com/BiYuqi/node-expresss-mongodb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BiYuqi/node-expresss-mongodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2Fnode-expresss-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2Fnode-expresss-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2Fnode-expresss-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2Fnode-expresss-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BiYuqi","download_url":"https://codeload.github.com/BiYuqi/node-expresss-mongodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2Fnode-expresss-mongodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31759459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","mongodb","mongoose","nodejs"],"created_at":"2024-10-12T00:19:17.846Z","updated_at":"2026-04-13T15:33:24.138Z","avatar_url":"https://github.com/BiYuqi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  node-expresss-mongodb\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/vuejs/vue\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/vue-2.5.2-blue.svg\" alt=\"vue\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/ElemeFE/element\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/element----ui-2.3.2-blue.svg\" alt=\"element-ui\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/BiYuqi/node-expresss-mongodb/blob/master/LICENSE\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/github/license/mashape/apistatus.svg\" alt=\"license\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e 基于vue2.x + element-ui + node + express + mongodb 前后端分离的简约商品管理,主要练习文件上传，接口编写，发布服务等\n\n\n## Download\n\n``` bash\n#  download\ngit clone https://github.com/BiYuqi/node-expresss-mongodb.git\n\ncd node-expresss-mongodb\n# install dependencies\nnpm install\n\n# local start web-page\nnpm run dev\n\n# local start server\nnpm i supervisor -g\nnpm run app\n```\n## server架构\n```html\nserver\n  ---common 公用模块\n  ---config 系统配置\n  ---constrollers 业务逻辑\n  ---middleware 中间件\n  ---models 数据模型(db)\n  ---routes 路由api\n  ---upload 上传文件目录\n  ---app.js 项目入口\n```\n```js\n// server主要依赖\nexpress\nbody-parser\ncookie-parser\nmulter\nmongoose\nconnect-mongo\njsonwebtoken\nioredis\nqn\n```\n\n## 下载并安装Mongodb\n\u003ca href=\"https://www.mongodb.com/download-center#community\"\u003e请自行安装下载MongoDB\u003c/a\u003e \u003cbr/\u003e\n\n**window平台注意事项：**\n\nMongoDB的数据存储在data目录的db目录下，但是这个目录在安装过程不会自动创建，所以你需要手动创建data目录，并在data目录中创建db目录。\n比如我的mongodb安装在了D盘，那么在安装目录创建上述文件夹比如D:\\data\\db\n\n**mac平台安装：**\n以下如果安装失败，请在命令前加sudo\n```js\n// sudo brew install mongodb\n// 安装mongodb\nbrew install mongodb\n// 创建数据库\nmkdir -p /data/db\n```\n\n\n## 启动Mongodb\n\u003e 以下平台具体命令有先后执行顺序\n\n**MAC**\n\n打开 terminal 或者 iterm2 打开两个tab\n\n* 一个输入 mongod 回车\n* 一个输入 mongo 回车\n\n**Window**\n\n在你的安装目录D:\\Program Files\\MongoDB\\Server\\4.0\\bin下,分别执行(双击)\n* mongod.exe\n* mongo.exe\n\n\u003chr /\u003e\n\n#### 项目中启动node server \u0026\u0026 前端代码\n本地node服务端接口，server文件夹\n* 为本地node服务，本地npm run dev后，需要在server目录 node app 来启动本地服务，以便登录正常进行\n* 开发环境建议使用supervisor app 来启动服务，可以实时调试node，热更新\n* 以下为src/utils/request.js文件配置\n```js\n// node 服务暴露出的接口地址\nconst BASE_URL = 'http://localhost:7085'\nconst service = axios.create({\n  baseURL: BASE_URL,\n  timeout: 20000\n})\n```\n\u003chr /\u003e\n\n## 注意事项\n* 项目使用npm i 安装依赖后，你npm run dev 可能会报错，这个时候需要 npm i node-sass sass-loader -D 来解决依赖问题\n* supervisor 必须全局安装才可以 npm i supervisor -g\n* 如果不是在server目录下启动 supervisor app 会导致上传文件目录报错，具体可进server/routes/upload.js进行修改(暂不建议修改)\n\n### TODO\n- [x] 拆分api,增加controllers模块\n- [x] 接口查询已支持分页模糊查询\n- [x] jwt鉴权初步实现\n- [ ] 图片上传，服务器支持七牛\n- [ ] 尝试分片上传，分类上传\n- [ ] redis实践数据缓存，接口缓存\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiyuqi%2Fnode-expresss-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiyuqi%2Fnode-expresss-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiyuqi%2Fnode-expresss-mongodb/lists"}