GithubHelp home page GithubHelp logo

nodejsblog's Introduction

前言

  1. 参考Nodejs开发指南一书的第5章,受限于书中的nodejs和express版本太低,相当一部分代码在新版本的nodejs和express下都是无法使用
  2. 感谢[cnodejs社区]
  3. 目前完成了一个简单微博所应具有的基础功能,后续会对此项目进行优化,完善和补充

微信公众号

欢迎关注微信公众号: Alt text

可以访问 这里 查看更多关于大数据平台建设的原创文章。

开发环境

  1. 操作系统: OSX Yosemite 10.10.5
  2. nodejs : v5.1.0QrCode.jpeg
  3. express : 4.14.0
  4. MongoDB : 3.2.7

项目介绍

1.用户注册

界面如下: 用户注册

2.用户登录

用户登录

3.发表微博

发表微博

4.显示微博

显示微博

5.登录密码错误

在注册成功后,尝试登录时,如果密码错误,则提示: 登录密码错误

6.权限控制

比如,在未登录的情况下,

  • 访问 /logout时,会提示: 未登录

用户已经登陆过时:

  • 手动输入 /login后,不让render 登录页面,且提示已经登录
  • 手动输入 /reg 后,不让render 注册页面,且提示已经登录

7.优化路由

通过express.router和写公共中间件来优化路由

8.优化errHander

当在测试环境下出现错误的路由时,会出现智能提示,显示错误信息 errorHander

9.其它功能

nodejsblog's People

Contributors

liuyongfei1 avatar

Stargazers

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