react-express-passport-boilerplate:具有React Hooks,Express,Passport,Mongoose和基于角色的路由的Boilerplate(基于react-scripts)-源码

上传者: 42097369 | 上传时间: 2021-02-03 14:06:04 | 文件大小: 69KB | 文件类型: ZIP
React-快速-护照-猫鼬样板 设置简单 克隆存储库,然后复制node ./setup.js 'My App Name' 演示版 关于此样板 这是一个基于react-scripts的样板。 它混合了React Hooks , Express , Mongoose和Passport 。 它使用cookie based authentication ,具有基于角色的客户端和服务器路由,并将一些用户数据存储在本地存储中。 客户端react hooks应用程序 路由 会话管理+身份验证 基于身份验证和角色的专用路由 用sass造型 Input Text和Button组件 服务器端express mongo通过连接mongoose passport认证 基于auth的页面路由和API路由 brypt密码加密 配置它 更改APP_SECRET和DB_URI .env值 从server/database/_insertDefaultUsers更改要插入数据库中的默认用户-这只是为了测试auth机制的能力-之后将其删除并插入您自己的用户。 删除setup.js 在本地运行 npm run

文件下载

资源详情

[{"title":"( 40 个子文件 69KB ) react-express-passport-boilerplate:具有React Hooks,Express,Passport,Mongoose和基于角色的路由的Boilerplate(基于react-scripts)-源码","children":[{"title":"react-express-passport-boilerplate-master","children":[{"title":"server","children":[{"title":"index.js <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false},{"title":"database","children":[{"title":"index.js <span style='color:#111;'> 356B </span>","children":null,"spread":false},{"title":"schema.js <span style='color:#111;'> 425B </span>","children":null,"spread":false},{"title":"_insertDefaultUsers.js <span style='color:#111;'> 623B </span>","children":null,"spread":false}],"spread":true},{"title":"routes","children":[{"title":"index.js <span style='color:#111;'> 95B </span>","children":null,"spread":false},{"title":"api.js <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"access.js <span style='color:#111;'> 660B </span>","children":null,"spread":false}],"spread":true},{"title":"service","children":[{"title":"user-service.js <span style='color:#111;'> 733B </span>","children":null,"spread":false}],"spread":true},{"title":"passport.js <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"package.json <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"LICENCE.md <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"setup.js <span style='color:#111;'> 1.74KB </span>","children":null,"spread":false},{"title":"package-lock.json <span style='color:#111;'> 158.48KB </span>","children":null,"spread":false},{"title":"new_README.md <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false},{"title":".env <span style='color:#111;'> 39B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"index.js <span style='color:#111;'> 329B </span>","children":null,"spread":false},{"title":"routes.js <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"containers","children":[{"title":"app-wrapper.js <span style='color:#111;'> 385B </span>","children":null,"spread":false}],"spread":true},{"title":"serviceWorker.js <span style='color:#111;'> 4.97KB </span>","children":null,"spread":false},{"title":"pages","children":[{"title":"index.js <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false},{"title":"admin.js <span style='color:#111;'> 386B </span>","children":null,"spread":false},{"title":"login.js <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":true},{"title":"common","children":[{"title":"config.js <span style='color:#111;'> 59B </span>","children":null,"spread":false},{"title":"roles.js <span style='color:#111;'> 76B </span>","children":null,"spread":false}],"spread":false},{"title":"components","children":[{"title":"input","children":[{"title":"index.js <span style='color:#111;'> 2.56KB </span>","children":null,"spread":false},{"title":"style.scss <span style='color:#111;'> 1.40KB </span>","children":null,"spread":false}],"spread":false},{"title":"session","children":[{"title":"index.js <span style='color:#111;'> 858B </span>","children":null,"spread":false}],"spread":false},{"title":"history","children":[{"title":"index.js <span style='color:#111;'> 284B </span>","children":null,"spread":false}],"spread":false},{"title":"button","children":[{"title":"index.js <span style='color:#111;'> 864B </span>","children":null,"spread":false},{"title":"style.scss <span style='color:#111;'> 749B </span>","children":null,"spread":false}],"spread":false},{"title":"header","children":[{"title":"index.js <span style='color:#111;'> 717B </span>","children":null,"spread":false},{"title":"style.scss <span style='color:#111;'> 330B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"styles","children":[{"title":"constants.scss <span style='color:#111;'> 359B </span>","children":null,"spread":false},{"title":"index.scss <span style='color:#111;'> 438B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 163B </span>","children":null,"spread":false},{"title":"public","children":[{"title":"manifest.json <span style='color:#111;'> 194B </span>","children":null,"spread":false},{"title":"robots.txt <span style='color:#111;'> 69B </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":".editorconfig <span style='color:#111;'> 147B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明