{"id":19852801,"url":"https://github.com/sumingcheng/node-router-auth","last_synced_at":"2026-05-11T07:47:13.288Z","repository":{"id":107426799,"uuid":"608425664","full_name":"sumingcheng/node-router-auth","owner":"sumingcheng","description":"node 实现完整的 JWT 登录流程","archived":false,"fork":false,"pushed_at":"2023-04-09T10:59:57.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-14T01:39:36.733Z","etag":null,"topics":["jwt","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/sumingcheng.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":"2023-03-02T01:40:36.000Z","updated_at":"2023-03-13T07:34:43.000Z","dependencies_parsed_at":"2023-04-11T20:09:11.567Z","dependency_job_id":null,"html_url":"https://github.com/sumingcheng/node-router-auth","commit_stats":{"total_commits":40,"total_committers":3,"mean_commits":"13.333333333333334","dds":0.475,"last_synced_commit":"950c8588d7d993e5bf19e507863b613c6732ed5f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sumingcheng/node-router-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fnode-router-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fnode-router-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fnode-router-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fnode-router-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumingcheng","download_url":"https://codeload.github.com/sumingcheng/node-router-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumingcheng%2Fnode-router-auth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262329370,"owners_count":23294667,"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":["jwt","nodejs","typescript"],"created_at":"2024-11-12T14:04:23.425Z","updated_at":"2026-05-11T07:47:13.258Z","avatar_url":"https://github.com/sumingcheng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![npm version](https://img.shields.io/badge/typescipt-4.5.0-green)\n![npm version](https://img.shields.io/badge/mongoose-7.0.0-green)\n![npm version](https://img.shields.io/badge/jsonwebtoken-9.0.0-green)\n![npm version](https://img.shields.io/badge/express-4.18.2-green)\n![npm version](https://img.shields.io/badge/bcrypt-5.1.0-green)\n![npm version](https://img.shields.io/badge/vue-3.2.13-green)\n![npm version](https://img.shields.io/badge/axios-1.3.4-green)\n![npm version](https://img.shields.io/badge/element--plus-2.2.35-green)\n\n# Node 实现后台 Vue3 + TS 实现客户端\n\n# 服务端构建流程\n\n1. 安装\n\n```\n    npm i express mongoose typescipt bcrypt jsonwebtoken dotenv\n```\n\n2. 安装类型注解，因为要使用到 TS\n\n```\n    npm i ts-node-dev @types/express @types/mongoose @types/node @types/jsonwebtoken @types/bcrypt -D\n```\n\n3. 初始化 TS 配置文件\n\n```\n    npm install -g typescript\n    tsc --init\n```\n\n## 依赖说明\n\npassword：MD5( MD5(password) + salt)\nsalt 在每次登录验证完毕后，就动态更改\nbcrypt 是加密算法工具，满足我们多种加密需求\n\n    \"bcrypt\": \"^5.1.0\",\n\n用来获取 process.env 的环境变量\n\n    \"dotenv\": \"^16.0.3\",\n\nHEADER+PAYLOAD+KEY = 生成 token\nhttp 请求可以在 authorization : Bearer + token\n\n    \"jsonwebtoken\": \"^9.0.0\",\n\n数据库操作的封装库\n\n    \"mongoose\": \"^7.0.0\",\n\n## 客户端端构建流程\n\n1. 创建项目 选择 Vue3 和 TS\n\n```text\n    npm install -g @vue/cli\n    vue create xxx\n```\n\n2. 安装 Axios\n\n```text\n    npm i axios\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumingcheng%2Fnode-router-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumingcheng%2Fnode-router-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumingcheng%2Fnode-router-auth/lists"}