{"id":15091659,"url":"https://github.com/xiaoping6688/node-server-project","last_synced_at":"2025-04-12T06:31:07.043Z","repository":{"id":143985127,"uuid":"82018220","full_name":"xiaoping6688/node-server-project","owner":"xiaoping6688","description":"基于 node.js + express 技术栈，采用MVC结构设计、JWT + RESTful API、PM2服务监控的Node服务器端项目框架.","archived":false,"fork":false,"pushed_at":"2019-04-21T09:00:21.000Z","size":10120,"stargazers_count":47,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T01:51:11.312Z","etag":null,"topics":["handlebars","mysql","node-framework","node-jwt","node-orm","node-restful","node-web-server","nodejs-express","pm2","rabbitmq","thrift"],"latest_commit_sha":null,"homepage":"","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/xiaoping6688.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-15T03:53:31.000Z","updated_at":"2024-07-08T08:34:42.000Z","dependencies_parsed_at":"2024-07-14T11:31:04.526Z","dependency_job_id":null,"html_url":"https://github.com/xiaoping6688/node-server-project","commit_stats":{"total_commits":67,"total_committers":1,"mean_commits":67.0,"dds":0.0,"last_synced_commit":"a33b25a9b06cc0c670a51fddbce7b4750672644e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoping6688%2Fnode-server-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoping6688%2Fnode-server-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoping6688%2Fnode-server-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoping6688%2Fnode-server-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoping6688","download_url":"https://codeload.github.com/xiaoping6688/node-server-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529385,"owners_count":21119501,"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":["handlebars","mysql","node-framework","node-jwt","node-orm","node-restful","node-web-server","nodejs-express","pm2","rabbitmq","thrift"],"created_at":"2024-09-25T10:42:31.424Z","updated_at":"2025-04-12T06:31:02.027Z","avatar_url":"https://github.com/xiaoping6688.png","language":"JavaScript","readme":"# node-server-project\n\u003e 基于 node.js + express 技术栈，采用MVC结构设计、JWT + RESTful API、PM2服务监控的Node Web项目框架。\n\n技术栈\n\n- node.js（\u003e7.0，已原生支持绝大部分ES6/ES7语法）\n- express（成熟稳定的Web框架）\n- hbs（handlebars后端模版引擎，语法简洁高效、实现模版继承和内嵌功能等）\n- RESTful（API架构风格，并提供统一的接口输出结构）\n- JWT（Json Web Token 认证协议，用于页面和API的验证，包括token续期方案等）\n- ORM（数据库对象关系映射）\n- TEST（集成在线API文档生成和测试工具[Swagger-ui](https://github.com/swagger-api/swagger-ui)，public/swagger目录下）\n- RabbitMQ \u0026 Thrift \u0026 环信服务端 集成等\n- PM2（Node服务自动部署和监控）\n\n关于API接口文档管理及线上线下测试，推荐：[SosoApi](http://www.sosoapi.com/)\n\n## Build Setup  @see package.json#scripts\n\n### Install dependencies, use cnpm:\nnpm install -g cnpm --registry=https://registry.npm.taobao.org\n```\ncnpm install\n```\n\n### Start server for development or production (pm2)\n\n```\nnpm start\n```\n\n### Auto restarting server and reloading browsers for development\n\n```\nnpm run live:client // 客户端源码变动实时监测\nnpm run live:server // 服务端源码变动实时监测\n```\n\n### For unit test, such as:\n\n```\nnpm test ./test/api/login.js\n```\n\n### Debug node code\n\nPlease install 'npm install -g node-inspector' at first\n\n```\nnpm run debug\n```\n\n### Check update for npm packages\n\nPlease install 'npm install npm-check-updates -g' at first\n\n```\nnpm run update\n```\n\n### PM2 operations and deploy（基于Git）\n\nFirst of all, please install node.js and git on the server and set $PATH env in ~/.bashrc\n```\nexport NODE_HOME=/data/node-v7.7.4-linux-x64\nexport PATH=$NODE_HOME/bin:$PATH\n```\n\nHost key verification after you execute ssh-keygen on server, and set ssh-key to gitlab.\n```\nssh-keyscan -t rsa yourGitServer \u003e\u003e ~/.ssh/known_hosts\n```\n\nFor client ssh password-less logon\n```\nssh-keygen -t rsa\nssh-copy-id -i ~/.ssh/id_rsa.pub node@192.168.1.10\n```\n\nthen, use ·npm run setup:test· for the first time, other deployment use ·npm run deploy:test·\n```\nnpm run setup:test // 测试环境远程部署（第一次安装）\nnpm run setup:simu // 仿真环境远程部署（第一次安装）\nnpm run setup:prod // 生产环境远程部署（第一次安装）\nnpm run deploy:test // 测试环境远程部署（后期更新）\nnpm run deploy:simu // 仿真环境远程部署（后期更新）\nnpm run deploy:prod // 生产环境远程部署（后期更新）\nnpm run stop\nnpm run reload\nnpm run list\nnpm run monit\nnpm run logs\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoping6688%2Fnode-server-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoping6688%2Fnode-server-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoping6688%2Fnode-server-project/lists"}