diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cccad46 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 7 +if: commit_message =~ ^build diff --git a/README.md b/README.md index d4d2286..e63787e 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,2 @@ -Express3 Demo -============================== - -Nodejs给Javascript赋予了服务端应用的生命,Jquery让Javascript成为浏览中开发的利器。 最近学习了Nodejs的Express3.0的开发框架,本来是按照“node.js开发指南”书中介绍,但“node.js开发指南”讲的是Express2.x的,从Express2.x到Express3.0自己模索中还是走了不少弯路的。写篇文章总结一下。 - -项目分支 ------------------------- - -+ Express 3.x Demo ( https://github.com/bsspirit/nodejs-demo/tree/express3 ) -+ Express 4.x Demo ( https://github.com/bsspirit/nodejs-demo/tree/express4 ) - -关于作者 ----------------------- - -* 张丹(Conan), 程序员Java,R,PHP,Javacript -* weibo:@Conan_Z -* blog: http://blog.fens.me -* email: bsspirit@gmail.com - -使用说明 ----------------------- - -Nodejs开发框架Express3.0开发手记–从零开始 - -http://blog.fens.me/nodejs-express3/ - -Mongoose使用案例:让JSON数据直接POST入MongoDB - -http://blog.fens.me/nodejs-mongoose-json/ - -源代码下载 ----------------------- - -程序代码已经上传到github有需要的同学,自行下载。 -https://github.com/bsspirit/nodejs-demo +read ,meeee +mkmkkm diff --git a/app.js b/app.js index 75725a5..346b985 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,7 @@ /** - * Module dependencies. +this is second commit in app.js + */ var express = require('express') @@ -94,4 +95,4 @@ function notAuthentication(req, res, next) { return res.redirect('/'); } next(); -} \ No newline at end of file +} diff --git a/models/Movie.js b/models/Movie.js index d219591..88ec505 100644 --- a/models/Movie.js +++ b/models/Movie.js @@ -43,11 +43,11 @@ MovieDAO.prototype.findByIdAndUpdate = function(obj,callback){ }); } - +//jxznjjshdjsdjshdsjd MovieDAO.prototype.findByName = function(name, callback) { Movie.findOne({name:name}, function(err, obj){ callback(err, obj); }); }; -module.exports = new MovieDAO(); \ No newline at end of file +module.exports = new MovieDAO(); diff --git a/package.json b/package.json index 5b77ff1..7f4bcba 100644 --- a/package.json +++ b/package.json @@ -11,4 +11,5 @@ "express": "3.2.2", "ejs": "*" } -} \ No newline at end of file +} + diff --git a/public/javascripts/movie.js b/public/javascripts/movie.js index 180d64e..ae42543 100644 --- a/public/javascripts/movie.js +++ b/public/javascripts/movie.js @@ -1,5 +1,5 @@ $(function() { - +//holla hoop var mdata={}; var url = '/javascripts/movie.json'; @@ -42,4 +42,4 @@ $(function() { }; -}); \ No newline at end of file +}); diff --git a/routes/index.js b/routes/index.js index 935c363..f343401 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,6 +1,6 @@ /* - * GET home page. + * GET home Hello world */ exports.index = function(req, res){ @@ -34,4 +34,4 @@ exports.logout = function(req, res){ exports.home = function(req, res){ res.render('home', { title: 'Home'}); -}; \ No newline at end of file +}; diff --git a/views/footer.html b/views/footer.html index c0d1d9f..2d579a0 100644 --- a/views/footer.html +++ b/views/footer.html @@ -1,6 +1,10 @@ + + + + - \ No newline at end of file + diff --git a/views/header.html b/views/header.html index 789f2ae..8231489 100644 --- a/views/header.html +++ b/views/header.html @@ -1,6 +1,8 @@ + + <%=: title %> diff --git a/views/home.html b/views/home.html index 1ae8d6b..48de1e3 100644 --- a/views/home.html +++ b/views/home.html @@ -1,4 +1,4 @@ <% include header.html %> -

Welcome <%= user.username %>, 欢迎登陆!!

- 退出 -<% include footer.html %> \ No newline at end of file +

Welcome <%= user.username %>, Gibberih nnnnnnnn

+ chineese +<% include footer.html %> diff --git a/views/index.html b/views/index.html index 2dc2c2a..0e5d278 100644 --- a/views/index.html +++ b/views/index.html @@ -1,4 +1,5 @@ <% include header.html %> +

Welcome to <%= title %>

登陆

-<% include footer.html %> \ No newline at end of file +<% include footer.html %> diff --git a/views/movie.html b/views/movie.html index 4dc68bb..5ff9345 100644 --- a/views/movie.html +++ b/views/movie.html @@ -1,4 +1,5 @@ <% include header.html %> +
@@ -12,4 +13,4 @@
-<% include footer.html %> \ No newline at end of file +<% include footer.html %>