Giter Site home page Giter Site logo

blogdyu's Introduction

blogDyu

整体结构

* 用户发送http请求 => 访问url => 解析路由 => 找到匹配的规则 =>执行指定的绑定函数,返回对应的内容至客户端(用户)

* 如果访问的是public开头的 => 静态 => 直接读取指定目录下的文件,返回给用户 (静态)

* 其他 => 动态 => 处理业务逻辑,加载模板,解析模板 => 返回数据给用户 (动态)

文件目录

db 数据库存储目录

models 数据库模型文件目录

node_modules node第三方模块目录

public 公共文件目录

routers 文件路由

schemas 数据库结构文件目录

views 页面

app.js 入口文件

package.json

整体结构

clone 地址或者 download 包

npm insatall 加载包

去mongo官网下载mongodb 数据库

启动数据库 mongod --dbpath=存放数据目录 默认端口(27017 可自行修改)

node app.js

blogdyu's People

Contributors

dongdeyu avatar brucebai1990 avatar li-mintong avatar

Stargazers

 avatar  avatar

Watchers

 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.