diff --git a/conf/app.conf b/conf/app.conf new file mode 100644 index 0000000..4bfdbf4 --- /dev/null +++ b/conf/app.conf @@ -0,0 +1,70 @@ +#------------------------ +# leanote config +#------------------------ + +http.port=9090 + +site.url=http://localhost:9090 # or http://x.com:8080, http://www.xx.com:9000 + +# mongdb +db.host=localhost +db.port=27017 +db.dbname=leanote # required +db.username=root # if not exists, please leave it blank +db.password=abc123 # if not exists, please leave it blank +# or you can set the mongdb url for more complex needs the format is: +# mongodb://myuser:mypass@localhost:40001,otherhost:40001/mydb +# db.url=mongodb://root:root123@localhost:27017/leanote + +# You Must Change It !! About Security!! +app.secret=V85ZzBeTnzpsHyjQX4ewqennzzsqqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvrD0y + +app.name=leanote +http.addr= +http.ssl=false +cookie.domain= +cookie.httponly=false +cookie.prefix=LEANOTE +cookie.secure=false +format.date=01/02/2006 +format.datetime=01/02/2006 15:04 +results.chunked=false + +#-------------------------------- +# revel config +# for dev +#-------------------------------- + +log.trace.prefix = "TRACE " +log.info.prefix = "INFO " +log.warn.prefix = "WARN " +log.error.prefix = "ERROR " + +# The default language of this application. +i18n.default_language=en + +module.static=github.com/revel/revel/modules/static + +[dev] +mode.dev=true +results.pretty=true +watch=true + +module.testrunner = github.com/revel/revel/modules/testrunner + +log.trace.output = stderr +log.info.output = stderr +log.warn.output = stderr +log.error.output = stderr + +[prod] +mode.dev=false +results.pretty=false +watch=false + +module.testrunner = + +log.trace.output = off +log.info.output = off +log.warn.output = %(app.name)s.log +log.error.output = %(app.name)s.log \ No newline at end of file diff --git a/conf/routes b/conf/routes new file mode 100644 index 0000000..f6d2f34 --- /dev/null +++ b/conf/routes @@ -0,0 +1,117 @@ +# Routes +# This file defines all application routes (Higher priority routes first) +# ~~~~ + +module:testrunner + +# Home is My Blog +Get / Index.Default +GET /note Note.Index +# leanote home +GET /index Index.Index + +GET /login Auth.Login +POST /doLogin Auth.DoLogin +GET /logout Auth.Logout +Get /demo Auth.Demo + +Get /register Auth.Register +POST /doRegister Auth.DoRegister + +GET /findPassword/:token Auth.FindPassword2 +GET /findPassword Auth.FindPassword +POST /doFindPassword Auth.DoFindPassword +POST /findPasswordUpdate Auth.FindPasswordUpdate + + +# blog + +GET /blog/getLikesAndComments Blog.GetLikesAndComments +GET /blog/getLikes Blog.GetLikes +* /blog/incReadNum Blog.IncReadNum +* /blog/likePost Blog.LikePost +* /blog/likeComment Blog.LikeComment +* /blog/deleteComment Blog.DeleteComment +GET /blog/getComments Blog.GetComments +* /blog/commentPost Blog.CommentPost +GET /blog/getPostStat Blog.GetPostStat + + +GET /blog/tags/:userIdOrEmail Blog.Tags +GET /blog/tags Blog.Tags + +GET /blog/tag/:userIdOrEmail/:tag Blog.Tag +GET /blog/tag/:tag Blog.Tag + +GET /blog/search/:userIdOrEmail Blog.Search +GET /blog/search Blog.Search + +GET /blog/archives/:userIdOrEmail Blog.Archives +GET /blog/archives Blog.Archives + +GET /blog/post/:noteId Blog.Post +GET /blog/post/:userIdOrEmail/:noteId Blog.Post +GET /blog/view/:noteId Blog.Post + +GET /blog/single/:userIdOrEmail/:singleId Blog.Single +GET /blog/single/:singleId Blog.Single + +GET /blog/cate/:notebookId Blog.Cate +GET /blog/cate/:userIdOrEmail/:notebookId Blog.Cate + +GET /blog/listCateLatest/:notebookId Blog.ListCateLatest +GET /blog/:userIdOrEmail Blog.Index +GET /blog Blog.Index +GET /blog/* Blog.E() + + +#--------------- +# preview +GET /preview/tags/:userIdOrEmail Preview.Tags +GET /preview/tags Preview.Tags + +GET /preview/tag/:userIdOrEmail/:tag Preview.Tag +GET /preview/tag/:tag Preview.Tag + +GET /preview/search/:userIdOrEmail Preview.Search +GET /preview/search Preview.Search + +GET /preview/archives/:userIdOrEmail Preview.Archives +GET /preview/archives Preview.Archives + +GET /preview/view/:noteId Preview.Post + +GET /preview/post/:noteId Preview.Post +GET /preview/post/:userIdOrEmail/:noteId Preview.Post + +GET /preview/single/:userIdOrEmail/:singleId Preview.Single +GET /preview/single/:singleId Preview.Single + +GET /preview/cate/:notebookId Preview.Cate +GET /preview/cate/:userIdOrEmail/:notebookId Preview.Cate + +GET /preview/:userIdOrEmail Preview.Index +GET /preview Preview.Index + +# Map static resources from the /app/public folder to the /public path +GET /favicon.ico Static.Serve("public/images/favicon.ico") +GET /public/*filepath Static.Serve("public") +GET /js/*filepath Static.Serve("public/js") +GET /images/*filepath Static.Serve("public/images") +GET /img/*filepath Static.Serve("public/img") +GET /css/*filepath Static.Serve("public/css") +GET /fonts/*filepath Static.Serve("public/fonts") +GET /tinymce/*filepath Static.Serve("public/tinymce") +#GET /plugins/*filepath Static.Serve("public/tinymce/plugins") +GET /upload/*filepath Static.Serve("public/upload") + +# member +# the prefix of member's controllername is "Member" +* /member MemberIndex.Index +* /member/index MemberIndex.Index + +GET /share/note/:noteId Share.ShowShareNote +# common +* /:controller/:action :controller.:action +* /api/:controller/:action :controller.:action +* /member/:controller/:action :controller.:action \ No newline at end of file