{"id":15253550,"url":"https://github.com/manydots/node","last_synced_at":"2026-02-16T09:36:45.368Z","repository":{"id":57143704,"uuid":"206483306","full_name":"manydots/node","owner":"manydots","description":"nginx+node+koa+socket+mysql+ejs 聊天室简单尝试","archived":false,"fork":false,"pushed_at":"2019-09-29T06:43:47.000Z","size":184,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-15T21:22:30.970Z","etag":null,"topics":["ejs","mysql","nginx","node"],"latest_commit_sha":null,"homepage":"https://doso.jeeas.cn","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/manydots.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":"2019-09-05T05:39:55.000Z","updated_at":"2019-09-29T06:43:49.000Z","dependencies_parsed_at":"2022-09-06T00:10:57.178Z","dependency_job_id":null,"html_url":"https://github.com/manydots/node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manydots/node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manydots%2Fnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manydots%2Fnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manydots%2Fnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manydots%2Fnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manydots","download_url":"https://codeload.github.com/manydots/node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manydots%2Fnode/sbom","scorecard":{"id":616178,"data":{"date":"2025-08-11","repo":{"name":"github.com/manydots/node","commit":"9cfae0808a792e23e889e4ccf90577fcb202ead4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T04:01:43.680Z","repository_id":57143704,"created_at":"2025-08-21T04:01:43.681Z","updated_at":"2025-08-21T04:01:43.681Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29504854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"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":["ejs","mysql","nginx","node"],"created_at":"2024-09-29T21:05:25.612Z","updated_at":"2026-02-16T09:36:45.351Z","avatar_url":"https://github.com/manydots.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n\n[![](https://flat.badgen.net/npm/v/dosn?icon=npm)](https://www.npmjs.com/package/dosn) [![NPM downloads](http://img.shields.io/npm/dm/dosn.svg?style=flat-square)](https://www.npmjs.com/package/dosn)\n\n\u003c/div\u003e\n\u003cpre\u003e\n  demo为node项目，建议clone到本地view\n\u003c/pre\u003e\n\n## share\n```\n  \n  demo结构还在优化中，nginx监听doso.jeeas.cn的80端口，转发到内部3030端口；\n  nginx未配置负载均衡，已拦截ip访问；\n\n  npm run chat:http\n  简单聊天室启动方式[running]\n\n  npm run server\n  建议使用启动方式(debounce防抖函数500ms测试)\n\n  npm run wechat\n  简单聊天室启动方式(debounce防抖函数400ms测试)\n\n  npm run start or npm start\n  koa框架启动方式，建议自行配置\n\n\n  预览地址 https://doso.jeeas.cn\n\n  node环境:\n    1、yum安装node会安装一个老版本;\n    2、建议使用 n 管理node版本(npm install -g n);\n        n 常用的命令有：\n        n 会列出所有安装的版本供你切换\n        n latest 安装最新版本\n        n stable 安装最新稳定版\n        n lts 安装最新长期支持版本\n        n rm [版本号] 删除某一版本\n        n -h 帮助命令\n        n [版本号] 安装指定版本node\n\n        Tips:\n          若n切换的版本未生效还需要手动配置一下;\n          a.查看系统node的安装路径: which node\n          b.通过N_PREFIX变量来修改 n 的默认node安装路径\n            .编辑环境配置文件: vim ~/.bash_profile \n            .添加配置语句:\n             export N_PREFIX=/usr/local/node  (#node实际安装位置)\n             export PATH=$N_PREFIX/bin:$PATH\n          c.执行source使修改生效: source ~/.bash_profile\n          d.检查是否生效: echo $N_PREFIX\n          (亲测可用,转自:https://www.jianshu.com/p/d934d3ba67ec)\n\n    3、node项目可以使用pm2管理\n    4、在linux上使用screen挂起任务\n\n\n  遇到的坑：\n\n\t  koa:使用 nginx+node+koa+mysql+ejs 简单尝试，透传获取真实ip；\n\n  \tlog4js:日志级别无法拆分(原因未知)，未启用线程，都会打在info日志里；\n\n  \tkoa-static:配置的静态资源无法访问(原因:配置问题)，可使用koa-static-router代替；\n\n  \tkoa-bodyparser:读取post数据中间件=\u003ectx.request.body；\n\n  \thttp-proxy-middleware:在入口处可配置转发请求；\n\n  \tkoa-views:使用模板引擎(ejs)；\n\n  \tkoa-router:配置路由，考虑动态方式，demo需要改进；\n\n\n    linux上 export port=3030 \u0026\u0026 node --trace-deprecation chat.js\n    windows上 set port=3030 \u0026\u0026 node --trace-deprecation chat.js\n\n\n\n\n\n```\n\n### 关于https\n```javascript\n  \n  通过https访问才可以调用桌面通知Notification.requestPermission推送消息\n\n  阿里云免费SSL: https://common-buy.aliyun.com/?commodityCode=cas\u0026aly_as=zI60LOb8#/buy\n  配置可以访问\n\n```\n\n### nginx下配置socket.io\n```javascript\n    \n    //解决ws连接问题 参考:https://www.cnblogs.com/qkstart/p/11246173.html\n\n    #80端口转443访问\n    upstream nodes {\n       ip_hash;\n       server localhost:3030;\n    }\n    server {\n       listen       80;\n       server_name  doso.jeeas.cn;\n       rewrite ^(.*)$  https://$http_host$1 permanent;\n    }\n    server {\n        #listen 80;\n        listen 443 ssl;\n        server_name  doso.jeeas.cn;\n        access_log  logs/doso443.log;\n        #ssl on;   #设置为on启用SSL功能。\n        ssl_certificate cert/doso.jeeas.cn.pem;\n        ssl_certificate_key cert/doso.jeeas.cn.key;\n        ssl_session_timeout 5m;\n        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;  #使用此加密套件。\n        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;   #使用该协议进行配置。\n        ssl_prefer_server_ciphers on;\n        location / {\n              proxy_pass http://nodes; #反向代理集群\n              proxy_buffering off;    #此参数非常重要，必须禁用代理缓存.\n              proxy_set_header Host $host:$server_port;\n              proxy_set_header        X-Real-IP $remote_addr;\n              proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;\n              proxy_http_version 1.1;\n              proxy_set_header Upgrade $http_upgrade;\n              proxy_set_header Connection \"Upgrade\";\n\n        }\n    }\n\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanydots%2Fnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanydots%2Fnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanydots%2Fnode/lists"}