Giter VIP home page Giter VIP logo

class2api_scaffold_admin's Introduction

管理后台权限认证型,super的基础上附带管理身份权限校验

在 $ Class2api init 初始化时被拉取

$ class2api init
 脚手架模版类型:
 - base   ——精简型,不带before/after拦截器
 - normal ——普通型,带before/after拦截器、API缓存机制
 - super  ——增强型,带before/after拦截器、API缓存机制、数据库访问
 - admin  ——管理后台权限认证型,super的基础上附带管理身份权限校验
选择以上哪种模版?(base/normal/super/admin): admin
给创建的新项目取个名字(adminDemo30221): 

 远程提取模版文件 ...

 请配置数据库链接:
    数据库IP(127.0.0.1): 
    数据库端口(3306): 
    数据库访问用户(root): 
    数据库密码(默认为空): 
    创建新数据库的名称/存在则忽略(class2api_demo): class2api_demo456
    数据库编码(utf8_general_ci): 

 √ 数据库配置成功!

 √ 项目创建成功!

 开始体验:

 $ cd adminDemo30221 && npm install && npm start

#开发环境 # $ npm run start $ pm2 ecosystem/ecosystem_dev.json #测试环境 # $ NODE_ENV=test REDIS_SESSION=1 node ./src/index.js $ pm2 ecosystem/ecosystem_test.json #正式环境# $ NODE_ENV=production REDIS_SESSION=1 node ./src/index.js $ pm2 ecosystem/ecosystem.json

初始化或重置数据库

$ DB_RESET_1=123234537569 DB_RESET_2=wrq5hfoiuy12344376 node toolscript/run-resetModel.js

#本地启动redis: cd /usr/local/redis && src/redis-server cd /usr/local/redis && src/redis-cli

#nginx 重启 pkill -9 nginx

$ npm i class2api@latest --registry=https://registry.npm.taobao.org

class2api_scaffold_admin's People

Contributors

gankao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.