{"id":14964254,"url":"https://github.com/itcnz/nuxt-ssr","last_synced_at":"2025-04-06T07:15:30.747Z","repository":{"id":40957195,"uuid":"125039025","full_name":"ITCNZ/Nuxt-ssr","owner":"ITCNZ","description":"✨vue+nuxt+sass+node+express+MongoDB 实现的SSR项目。","archived":false,"fork":false,"pushed_at":"2023-01-04T00:50:18.000Z","size":2690,"stargazers_count":349,"open_issues_count":26,"forks_count":71,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-06T07:15:07.569Z","etag":null,"topics":["axios","element-ui","express","mongodb","nodejs","nuxt-quill-plugin","nuxtjs","sass","ssr","vuejs","vuex"],"latest_commit_sha":null,"homepage":"https://itcnz.github.io/20180320/mynuxt.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ITCNZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-13T11:13:03.000Z","updated_at":"2025-02-24T02:56:38.000Z","dependencies_parsed_at":"2023-02-01T16:02:24.457Z","dependency_job_id":null,"html_url":"https://github.com/ITCNZ/Nuxt-ssr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITCNZ%2FNuxt-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITCNZ%2FNuxt-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITCNZ%2FNuxt-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ITCNZ%2FNuxt-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ITCNZ","download_url":"https://codeload.github.com/ITCNZ/Nuxt-ssr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445682,"owners_count":20939961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["axios","element-ui","express","mongodb","nodejs","nuxt-quill-plugin","nuxtjs","sass","ssr","vuejs","vuex"],"created_at":"2024-09-24T13:32:52.658Z","updated_at":"2025-04-06T07:15:30.722Z","avatar_url":"https://github.com/ITCNZ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuxt-ssr是一个文章增删改查的SSR项目\n\n\u003e Nuxt.js该项目是一个ssr结构完整的项目，适合新人练手使用，如果对您有帮助，请右上角给个star，鼓励一下，同时希望指正。也可以加 nuxt技术交流群，大家一起相互学习，相互成长。\n\n\n## 用到的技术\n\n\u003e Vue.js v2.0.0\n\n\u003e Nuxt.js v1.0.0\n\n\u003e Node.js v9.8.0 (必须\u003e=8.0)\n\n\u003e Express.js v4.x\n\n\u003e MongoDB v3.4.7\n\n\u003e element-ui v2.3.2\n\n\n## 目录结构\n\n```\n├── assets                              资源目录 assets 用于组织未编译的静态资源如 LESS、SASS 或 JavaScript\n├── build                               打包后的文件\n├── components                          存放组件，用于组织应用的 Vue.js 组件\n│   ├── Footer                          页面footer组件\n│   ├── ....\n├── layouts                             布局模板文件，默认default，通过为页面设置layout更改\n│   ├── edit                            编辑/创建文章模板\n│   ├── ....\n├── middleware                          存放应用的中间件\n│   ├── auth.js                         路由是否登录拦截\n│   ├── ...\n├── node_modules                        Node依赖文件\n├── nuxt.config.js                      Nuxt主配置文件\n├── pages                               存放页面的目录\n│   ├── index.vue                       首页\n│   ├── ....\n├── plugins                             存放插件，用于组织那些需要在 根vue.js应用 实例化之前需要运行的 Javascript 插件\n│   └── nuxt-quill-plugin.js            富文本编辑器插件\n├── README.md                           README\n├── server                              express后台目录\n│   ├── api.js                          server端接口\n│   ├── db.js                           连接MongoDB数据库文件\n│   ├── listrouter.js                   server启动配置\n│   ├── ....\n├── static                              静态文件目录,此类文件不会被 Nuxt.js 调用 Webpack 进行构建编译处理。 服务器启动的时候，该目录下的文件会映射至应用的根路径 / 下\n├── util                                存放一些工具文件（自己添加）\n│   ├── net.js                          封装网络请求\n│   ├── ui.js                           封装ui弹框配置\n│   ├── ...\n```\n\n\n## 前端开发指南\n\n\u003e 首先需要安装 \u003e=node8.0 因为nuxt1.0.0 必须在\u003e=node8.0的环境下才可以安装成功\n\n\u003e 安装element-ui, 安装方法页面[这个页面](http://element.eleme.io/#/zh-CN/component/quickstart)下面有比较详细的demo,可参考\n\n\u003e 富文本编辑器nuxt-quill-plugin的安装与使用 [nuxt-quill-plugin](https://github.com/surmon-china/vue-quill-editor).\n\n\u003e （划重点，因为本地前后端检测同一个接口无法实现，所以与下面的后端端口不同）前端监控的是3389端口 ,执行命令 \"npm run dev\";\n\n\n\n## 后端开发指南\n\n\u003e 下载安装MongoDB, 具体详情不在此赘述,给上链接 [MongoDB](https://www.mongodb.com/download-center?jmp=nav#atlas).\n\n\u003e 安装Express, 具体详情不在此赘述,给上链接 [Express](http://expressjs.com/zh-cn/4x/api.html) .\n\n\u003e 安装supervisor 实时监控，可以进行全局，也可只安装在本项目中。全局安装方法：sudo npm install -g supervisor.\n\n\u003e （划重点，因为本地前后端检测同一个接口无法实现，所以与上面的前端端口不同）后端监控的是3000端口, 需要,cd 到 server文件夹目录下,执行命令 \"supervisor listrouter.js\";\n\n\n## 阿里云部署\n\n\u003e 具体部署步骤不在此详解，具体可看[详细教程](https://itcnz.github.io/20180418/%E9%98%BF%E9%87%8C%E4%BA%91%E9%83%A8%E7%BD%B2nuxt%E9%A1%B9%E7%9B%AE.html)\n\n\n## 构建与运行\n\n``` bash\n# install dependencies\n$ npm install # Or yarn install\n\n# serve with hot reload at localhost:3000\n$ npm run dev\n\n# build for production and launch server\n$ npm run build\n$ npm start\n\n# generate static project\n$ npm run generate\n```\n\nFor detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitcnz%2Fnuxt-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitcnz%2Fnuxt-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitcnz%2Fnuxt-ssr/lists"}