使用 nodejs 编写的博客程序 -- Noderce。求 fork, 求 pull request - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
willerce
V2EX    Node.js

使用 nodejs 编写的博客程序 -- Noderce。求 fork, 求 pull request

  •  
  •   willerce 2012-12-22 13:16:47 +08:00 7763 次点击
    这是一个创建于 4744 天前的主题,其中的信息可能已经有所发展或是发生改变。
    noderce 是一个使用 nodejs 编写的博客程序,使用了 express , jade , mongoskin 等第三方框架、模块。使用 mongodb 做存储。

    支持 gravatar 头像,akismet 防垃圾评论。

    noderce 的功能很简单。没有开发标签、分类、友情链接功能,仅有文章、页面、评论。

    目前还在完善中。

    演示地址: http://willerce.com

    github: https://github.com/willerce/noderce
    第 1 条附言    2012-12-28 18:41:30 +08:00
    可爱的 nasawz 为 noderce 做了一个主题,非常感谢。
    第 2 条附言    2012-12-30 17:31:39 +08:00
    文章:Noderce AppFog 部署指南 http://willerce.com/post/noderce-deploy-to-appfog
    25 条回复    1970-01-01 08:00:00 +08:00
    nasa
        1
    nasa  
       2012-12-22 18:01:59 +08:00
    支持楼主,已fork。 学习nodejs中
    Juanito
        2
    Juanito  
       2012-12-22 20:28:58 +08:00
    也有一个用 nodejs 做的 blog framework: [hexo](http://zespia.tw/hexo)
    linkgod
        3
    linkgod  
       2012-12-22 22:59:29 +08:00
    学习一下!
    ergatea
        4
    ergatea  
       2012-12-22 23:29:17 +08:00
    代码可读性非常好,谢谢.
    MarshallChen
        5
    MarshallChen  
       2012-12-23 00:30:49 +08:00
    看上去很顺眼,感谢 ~
    huyipeng
        6
    huyipeng  
       2012-12-23 00:49:48 +08:00
    看了一下,楼主就在楼下公司啊!有时间可以交流一下~
    willerce
        7
    willerce  
    OP
       2012-12-23 03:18:05 +08:00 via Android
    @huyipeng 咦?美图还是飞博?
    shanks
        8
    shanks  
       2012-12-23 10:18:22 +08:00
    矣,看起来不错的说,有空看看node.js
    想star一下可惜github down了Orz
    hidden
        9
    hidden  
       2012-12-23 10:47:47 +08:00
    哈罗,我是 willerce,湖建淫,脑残九零后。

    去过俄国,卖过皮衣,现在在天朝敲代码。前后端都搞,喜欢瞎折腾。

    ------------------

    经历真丰富啊!
    willerce
        10
    willerce  
    OP
       2012-12-23 12:39:37 +08:00
    @hidden 经历丰富的另一种说法就是喜欢瞎折腾,啥也没做成的意思!
    huyipeng
        11
    huyipeng  
       2012-12-23 17:35:00 +08:00
    @willerce 美图
    leohxj
        12
    leohxj  
       2012-12-28 15:00:41 +08:00
    同学~网站挂掉了?
    willerce
        13
    willerce  
    OP
       2012-12-28 18:41:14 +08:00
    @leohxj 中午的时候 appfog 挂了。 appfog 还不太稳定。
    leohxj
        14
    leohxj  
       2012-12-28 23:15:35 +08:00
    fork下来后如何和你的代码同步?还有如何提交?
    willerce
        15
    willerce  
    OP
       2012-12-28 23:17:42 +08:00
    @leohxj github 是这样的,fork 以后,你就有了一个自己的库。你的任何更改都可以提交到自己的库里。

    当你觉得需要和我的代码进行合并时,提交 pull request 即可。

    我同意后,就会合并到我的库里。
    leohxj
        16
    leohxj  
       2012-12-29 08:47:45 +08:00
    @willerce 如果你的代码更新了,我如何同步你更新的部分?
    barbery
        17
    barbery  
       2012-12-29 13:07:49 +08:00
    不错~~~clone回来学习下~~~
    weihuilee
        18
    weihuilee  
       2012-12-30 01:26:36 +08:00   1
    @leohxj
    git remote add willerce git://github.com/willerce/noderce.git
    git fetch willerce
    git merge willerce/master
    leohxj
        19
    leohxj  
       2012-12-30 01:33:00 +08:00
    @weihuilee 这么晚了还帮忙解答,感谢!
    leohxj
        20
    leohxj  
       2012-12-30 01:36:34 +08:00
    @weihuilee 是在我clone之后,加上上面的几句吧?fetch和merge之间需要处理和本地代码的冲突吗?
    weihuilee
        21
    weihuilee  
       2012-12-30 11:48:15 +08:00
    @leohxj 对的, merge的时候需要处理本地代码冲突。
    xvfeng
        22
    xvfeng  
       2012-12-30 16:23:33 +08:00
    楼主你好。我按照你的github页面的说明,同样把代码托管到了appfog上。但是连接的时候出现502错误。应该是我数据库连接不正确。请问该如何正确的配置?(用的也是mongodb 1.8)
    willerce
        23
    willerce  
    OP
       2012-12-30 16:38:15 +08:00
    @xvfeng 抱歉没有对此做足够的说明。

    我使用的是 appfog add-on 中的 MongoLab 服务, Install 之后,就会在 Environment Variables 中生成一条名为 MONGOLAB_URI 的变量。

    所以 noderce 中的配置写成这样,直接把 env.MONGOLAB_URI 取出连接串

    exports.db = mongoskin.db(process.env.MONGOLAB_URI || "mongodb://localhost/noderce");


    ------------------

    如果,你选择的机房如果不可添加 MongoLab 服务,或者你希望使用 appfog 自带的 mongodb 服务。你需要把 noderce config.js 中的 exports.db 修改成这样


    if(process.env.VCAP_SERVICES){
    var env = JSON.parse(process.env.VCAP_SERVICES);
    var mOngo= env['mongodb-1.8'][0]['credentials'];
    }
    else{
    var mOngo= {
    "hostname":"localhost",
    "port":27017,
    "username":"",
    "password":"",
    "name":"",
    "db":"db"
    }
    }
    var generate_mongo_url = function(obj){
    obj.hostname = (obj.hostname || 'localhost');
    obj.port = (obj.port || 27017);
    obj.db = (obj.db || 'test');
    if(obj.username && obj.password){
    return "mongodb://" + obj.username + ":" + obj.password + "@" + obj.hostname + ":" + obj.port + "/" + obj.db;
    } else{
    return "mongodb://" + obj.hostname + ":" + obj.port + "/" + obj.db;
    }
    }
    exports.db = mongoskin.db(generate_mongo_url(mongo););
    willerce
        24
    willerce  
    OP
       2012-12-30 17:32:22 +08:00
    @xvfeng 已经写文章介绍,另Github上也已经更新了使用 appfog mongodb 服务代码。Noderce AppFog 部署指南 http://willerce.com/post/noderce-deploy-to-appfog
    xvfeng
        25
    xvfeng  
       2012-12-30 17:33:40 +08:00
    @willerce 哈哈。感谢!已在看到您的帖子之前自行成功部署!Thanks anyway!
    慢慢摸索学习去了!
    [appfog的官方说明:mongodb](https://docs.appfog.com/services/mongodb)
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     4094 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 674ms UTC 00:11 PVG 08:11 LAX 16:11 JFK 19:11
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86