Giter Club home page Giter Club logo

blog's Introduction

基于Node.js+Express+Mongodb+Mongoose的zk-blog项目

-响应式界面开发

-进入根目录

MVC模块化**

  • Model 模型(数据操作)
  • View 模板视图(页面展示)
  • Controller 控制器(路由控制)

app.js

-项目结构 -zk-blog my_item │ package-lock.json │ package.json 项目配置文件 │ readme.md 项目说明 ├─node_modules 第三方模块文件 ├─controller 路由控制 ├─libs 后台工具包 ├─models 模型 操作数据 ├─static 前台静态资源 ├─assets 前台静态资源 └─views 视图模板

第三方包

1.express 2. mongoose 3 ejs 模板引擎

4 formidable 上传文件 5 uuid 生成一个唯一的字符串

##前台模板说明 整理好前台模板以后,把它放入views文件夹

###前台页面 index 文件夹 -首页 index.html -列表页 blog.html -内容页 detail.html

抽象出首页模块的公共头和公共底部

用户页面

user 文件夹 -用户首页 index.html -用户登录 login.html -用户注册 reg.html -用户发表文章 publish.html

设计路由

路由决定了用户想要什么,用户想要和服务器交互只能t通过路由 路由去之后按对应的末班和数据 ###首页路由模块

用户路由模块

##上传文件

设计数据库

blog's People

Contributors

akun576 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.