Technology stack vue + vue-router + nodejs + koa2 + mongodb + nginx
The entire system needs environment nginx (distribute requests to nodejs, http2, ssl), nodejs (data processing), mongodb (data storage)
This project is for learning reference only, please do not use it for any commercial or illegal purposes. I shall not bear any legal liabilities arising therefrom!
Backstage management system part (using vue family bucket)
Android APP is developed using google flutter technology
By default, Cms only has three plug-in collection plug-ins, including cover uploading Qiniu CDN, static resource generation, and playback source url replacement. Please click the link below to download more collection plug-ins. Or develop your own collection plug-in development plug-in, use plug-in, download plug-in => plug-in tutorial, plug-in development, install plug-in
Hand in hand to develop nodejs movie cms system ③: Lazy deployment of pagoda panel
Requirements: nodejs >=7.6 mongodb >=3.4
#Installation dependencies
npm install
## Initialization data (to create a default data)
npm run build
## Global installation pm2 forever
npm install pm2 forever -g
## Main program starts
pm2 start app.js -i max --name app
## Regular task startup
forever start cron.js
server {
listen 80 ;
## http mandatory redirect https
rewrite ^(. * )$ https:// $host $1 permanent ;
}
server {
location / {
proxy_set_header Host $ HTTP_HOST ;
proxy_set_header the X--Real-IP $ REMOTE_ADDR ;
proxy_set_header the X--Forwarded-the For $ proxy_add_x_forwarded_for ;
proxy_set_header the X--nginx-Proxy to true ;
## here because nodejs just opened http, so nginx forwarded to the requesting nodejs of, nodejs own can only identify himself open http, rather than HTTPS
## so the need to add a header field manual that tells nodejs, the current protocol is http or HTTPS
proxy_set_header-the X-proxy-protocol " HTTPS " ;
## to the proxy's local agent to background nodejs
proxy_pass http://127.0.0.1:9999 ;
}
## Monitor ssl 443 port
the listen 443 ssl HTTP2 ;
## fill this domain, open the domain verification only allow access to the domain name
server_name xxx.com ;
## Open ssl
## Specify ssl certification path
ssl_certificate /etc/ssl/xxx.com_chain.crt ;
## specify the private key file path
ssl_certificate_key /etc/ssl/xxx.com_key.key ;
}
Management system address http://localhost:9999/manage/index.html User name: root Password: 123456
├─backup // Data backup storage folder
│
├─build // Initialize the database
│ │
│ └──initBase.js // Database initialization operation
│
├─static // static files - front and back pages
│
├─script // Script directory - capture script
│
├─methods // The front-end and back-end logic processing methods follow the mvc mode
│ │
│ ├──manage // Backstage management system catalog - method
│ │
│ ├──public.js // public method of front-end page - method
│ │
│ └──web.js // Front-end page method - method
│
├─router // Global routing directory - interface summary
│ │
│ ├──manage // Backstage management system directory - routing
│ │
│ ├──manage.js // use management system directory - routing
│ │
│ └──web.js // use front-end display routing - routing
│
├─middleware // Middleware directory
│ │
│ ├─router.js // used to verify various paths
│ │
│ ├─service.js // Used to verify that the website is open/closed (the foreground part)
│ │
│ └─userIp.js // Used to process user ip (nginx proxy or nodejs ipv4)
│
├─utils // tool method, configuration file
│ │
// Cookie ├─cookie │ < = > the session storage middleware > mount ctx.sessin1
│ │
// token ├─token │ < = > the session storage middleware > mount ctx.session2
│ │
│ ├─pipeline // mongodb pipeline query model
│ │
│ ├─authToken.js // verify that the token is valid
│ │
│ ├─baseConnect.js // mongodb connection file
│ │
│ ├─config.js // initialize database configuration parameters
│ │
│ └─tools.js // Tool function
│
├─app.js // project main file (using pm2 guardian)
│
├─cron.js // Timed task file (use forever guard alone)
Author: abcd498936590
Source Code: https://github.com/abcd498936590/Dart-Cms
#vue #vuejs #javascript