About

The whole project is divided into two parts: foreground project interface, background management interface. Involving login, registration, automatic deployment, article display, article details, article classification, access to user information, user collection, etc., constitute a complete process.

Note: this project is purely personal, not used for any commercial purposes. This project was built by learning from KOA in 2018, but the boss did not maintain it. Now the latest version of front-end and server uses EGG, and the interface project has been reconstructed

instructions

If you are interested in this project, please click “Star” to support it. Thank you! ^_^

Development environment macOS Windows10 NodeJS 10.12.4

Deployment environment Ali Cloud CentOS 7.2 64-bit

Technology stack

nodejs + koa2 + es6/7 + redis + nginx + mysql +md5 + pm2+ koa-logger + koa-onerror

Project running

Before running the project, ensure that the following applications have been installed on the system: 1. Node (10.12.4 or later) 2. Import table manually write code2Session table APPID, appSecretCopy the code

cd blogs-wechat-koa

npm install

npm run serve

pm2 deploy deploy.yaml production upddate

Copy the code

Small program directory, direct import can be

blogs-wechat-koa/views/WXpodcast
Copy the code

Results demonstrate

(This demo effect is very different from the version you are running now)

Mobile terminal scan below the two-dimensional code applet

The target function

  • Article details — done
  • Article classification — done
  • List of articles — done
  • Getting user information — done
  • User favorites – complete ✨✨
  • Personal center — Done
  • Test interface – done
  • User likes — done
  • User authorization binding — done
  • My favorites list — done
  • Daily check-in – done
  • User information decryption – done
  • Utility class — Done
  • Service configuration – done
  • Mask interface — done
  • Get article comments – done
  • Insert article comments — done
  • Administrator permission verification —
  • Super administrator —
  • Log output — done
  • Details error — done
  • Isomorphism of front and back – done
  • Pm2 automatic publish deployment — done

Part of the screenshot

The project structure

. ├ ─ ─ blogs - wechat koa2 back-end services (both before and after the separation) │ │ │ ├ ─ ─ API │ │ └ ─ ─ index. The js koa2 - connection pool to mysql data encapsulation │ ├ ─ ─ the config | | └ ─ ─ index, js ├─ Controller │ │ ├─ ├─ Web System Controller │ │ ├─ ├─ ├─ Web System Controller │ │ ├─ │ │ ├─ ├─ collect.js │ │ ├─ Authorization.js │ │ ├─ collect.js │ │ ├── ├.js Personal Center interface │ │ ├── Index.js Test interface │ │ ├── Login. js User authorization binding interface │ │ ├─ │ │ ├─ ├─ maskVersion. Js interface │ │ ├─ maskVersion. Js interface │ │ ├─ maskVersion └ ─ ─ sign. Js sign-in interface │ ├ ─ ─ the db │ │ └ ─ ─ index. The js data connection │ ├ ─ ─ node_modules │ │ └ ─ ─ XXX. Js dependent package │ ├ ─ ─ redis │ │ └ ─ ─ index, js Redis configuration encapsulation │ ├ ─ ─ routes │ │ └ ─ ─ index. The js back-end routing │ ├ ─ ─ utils tools │ │ ├ ─ ─ examineToken. Js token expired configuration encapsulation │ │ ├ ─ ─ isObject. Js To judge whether the object is empty │ │ ├ ─ ─ time. Js time │ │ └ ─ ─ WXBizDataCrypt. Js wechat users decryption algorithm │ ├ ─ ─ views front-end static file hosting │ ├ ─ ─ the gitignore git ignore file │ ├ ─ ─ Deploy. yaml Pm2 automatic release configuration │ ├─ Index. Js Service Configuration │ ├─ Package-Lock. json (NPM run ├ ─ ├ ─ sci-tech (├ ─ sci-tech)Copy the code

Open source address

Project address: github.com/wangmiaozer…