Mainly Learn to Write Interface with Node

Based on Vue2.0+Vuex+Axios+NodeJs+Express+MySQL to realize the mall mobile web mall

Mainly learn to write interface with node

Front-end architecture

  • Page structure (H5, CSS3, native JS)
  • Framework (based on Vue scaffolding: vue-cli) to build
  • Data request processing framework (Axios)
  • Vue-Router for routing processing
  • Vue-LazyLoad for image loading

Server-side architecture

  • Choose NodeJs for background development
  • Express middleware for service configuration, routing and request processing
  • Official website http://www.expressjs.com.cn/
  • Mysql middleware handles the “communication” with the database
  • Body-Parser middleware for obtaining front-end request parameters

Database selection

  • Use MySQL to design and implement related databases

The current project has realized functions

  1. Homepage data display
  2. Display of category page data
  3. shopping cart
  4. mine
  5. Product details page
  6. product search

installation

MySQL database has been installed, and then import the migou.sql file

Then npminstall the local service third-party dependency module ( Node.js needs to be installed )

cd vue-jd
npm install
npm run dev

Finally open the background service

node server.js

Directory Structure

.
├── README.md           
├── libs // Encapsulation of common tool modules in the background, such as formatting events, MD5 encryption, etc.
├── route // compilation directory of background interface
├── server.js // configuration file of background service
├── webpack.config.js // webpack configuration file
├── index.html // project entry file
├── package.json // project configuration file
├── src // production directory
│ ├── assets // css js and image resources
│ ├── components // Various Vue components
│ ├── store // vuex state manager
│ ├── App.vue // Global Vue in the project
│ ├── main.js // Webpack pre-compiled entry
│ └── router.config.js // vue routing configuration file

Project renderings

Download Details:

Author: qi0126

Source Code: https://github.com/qi0126/node-JD

#node #nodejs #javascript

Mainly Learn to Write Interface with Node
2.00 GEEK