Structure-admin is a backend management and control system framework. The technology stack is: nodeJS+vue+vuex+mysql+redis. The front-end uses vue’s element-ui component library, the back-end uses nodeJS services, the database mysql, and the cache uses redis. , the backend completely uses nodeJS
, and the database uses mysql
. nodejs的thinkjs框架搭建的
and is a full-stack development. support:
- 1. Use vuex to implement state management
- 2. Static page, introduce back-end service (nodeJs)
- 3. The component uses element-ui
- 4. The page layout is top and left. The left and right layout uses elasticity and layout flex. The width is fixed on the left and the width is calculated on the right.
- 5. The left and right scroll bars are independent of each other. Remove the scroll bar on the body.
If you like the backend written in nodeJS
, which supports large front-end and full-stack development, please star
and fork
the project.
If you have any usage problems, please leave a message.
- ThinkJS (Node-side framework) official website
- Vue.js (client-side two-way data binding framework) official website
Online address: Online address, account number: test, password: 123456
1. First of all, your environment is nodejs and you will not be able to install and configure it. Reference: nodejs environment configuration
2. Clone the project
git clone https://github.com/saucxs/structure-admin.git
3. Install the corresponding dependencies for the structure-admin-web folder of the front-end vue and the node back-end structure-admin-node.
npm install
4. Install redis (you can consider installing RedisDesktopManager)
Reference: Install redis under window, installation of redis visual management tool (Redis Desktop Manager), basic use, instantiation project
5. Install mysql. I won’t go into details here.
6. Modify the nodejs backend configuration files adapter.js and config.js.
adapter.js
exports.cache = {
type: 'redis',
common: {
timeout: 24 * 60 * 60 * 1000 // millisecond
},
redis: {
handle: redisCache,
host: '127.0.0.1',
port: 6379,
password: 'a123456' //redis安装时候设置的秘密
}
};
//
//
exports.model = {
type: 'mysql',
common: {
logConnect: true,
logSql: true,
logger: msg => think.logger.info(msg)
},
mysql: {
handle: mysql,
database: 'structure_admin',
prefix: 'structure_',
encoding: 'utf8',
host: '127.0.0.1', //本地数据库
port: '3306', //数据库端口
user: 'root', //数据库的用户名
password: '123456', //数据库该用户名的密码
dateStrings: true
}
};
7. Database file, the address is structure-admin-node/src/common/mysql/structure_admin.sql
8. Start projects with separate front-end and back-end respectively.
(1) Startup of structure-admin-web of front-end vue
npm run dev
(2) and the startup of node backend structure-admin-node
npm start