Giter Club home page Giter Club logo

Comments (22)

qfdk avatar qfdk commented on July 20, 2024 1

@smallpath 回来看看,最近也比较忙,就没有过来关注一下。看到了不少的修改,感觉有空要跑一下看看。然后的等着那个搜索的逻辑,今天solr6.6出来了,可以考虑加solr的接口也行。弄个什么adaptor这样可以选择搜索模块之类的,只是个提议

from blog.

smallpath avatar smallpath commented on July 20, 2024 1

@qfdk 谢谢关注,恰好明天答辩,等一切结束了会集中更新一波

from blog.

smallpath avatar smallpath commented on July 20, 2024 1

@geekplux 屈屈那种如果需要评论的话依然要加载disqus, 我在思考可不可以用service worker代理掉disqus所有的请求. 备份的话只需要把数据库dump下来就可以了

from blog.

Hugo-seth avatar Hugo-seth commented on July 20, 2024

README 里的安装 redis 写错了,应该是 brew install redis,而不是 brew install redies。

from blog.

smallpath avatar smallpath commented on July 20, 2024

谢谢指出typo,之后会单独弄个文档站

from blog.

stormqx avatar stormqx commented on July 20, 2024

node方面有不错的书推荐吗?

from blog.

smallpath avatar smallpath commented on July 20, 2024

@stormqx 朴灵大大的深入浅出node.js, 第二版貌似正在写, 以及node-interview这个仓库. 其他的书都比较偏实战, 看你想学什么自行选择即可.

from blog.

stormqx avatar stormqx commented on July 20, 2024

@smallpath 谢谢回复,最近也打算手写一个博客来练手。关于koa2的实战部分有何心得?我找到的大部分书基本都是基于express来讲的。

from blog.

smallpath avatar smallpath commented on July 20, 2024

@stormqx koa和express差别非常小了,用过express直接上koa2.0没问题,这俩源码都才一千多行。

from blog.

qfdk avatar qfdk commented on July 20, 2024

Dockerfile 无法正常使用

使用 docker build -t blog . 进行docker 打包测试未能成功.

错误提示如下

npm ERR! Linux 4.9.13-moby
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yarn" "pm2"
npm ERR! node v7.7.4
npm ERR! npm  v4.1.2
npm ERR! path /usr/local/bin/yarn
npm ERR! code EEXIST

npm ERR! Refusing to delete /usr/local/bin/yarn: node_modules/npm/bin/npm-cli.js symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/bin/yarn
npm ERR! Move it away, and try again.

npm ERR! Please include the following file with any support request:
npm ERR!     /npm-debug.log
The command '/bin/sh -c npm install -g yarn pm2' returned a non-zero code: 1

似乎现在改成了用 yarn 管理的方式

建议 docker 打成直接可运行的包(加上 mongo 和 redis)

还有个问题为什么要用 redis 做缓存,只是一个 blog 似乎这个层面没有必要吧 ?

Front 文件夹里面可以独立编译运行博客页面,那另外一个 server(后端) 文件夹是干什么用的 ?

既然是 RESTful 后端,前端为什么不只是 vue.js 的代码,穿插很多别的代码 ...

之前认为 要是换个别的主题只是自己用 vue.js 或者 angularjs 写个前端,直接用后端 API 就解决了,似乎不是这么简单.

问了不少问题,写一个比较简单易懂的 doc 吧 或者写在 wiki 里面.

有问题请指正,对贡献代码还是有一定兴趣的.

from blog.

smallpath avatar smallpath commented on July 20, 2024

@qfdk

docker

  • yarn可以解决国内国外的网络问题
  • 直接加mongo redis太大了
    • 因为配置文件支持传环境变量,分出去的话可以直接指定host

这个项目现在docker其实只是弄着玩的,因为项目目前照我计划只完成了一小半,以后改动会比较大,因为是边做边改,因此目前折腾dockerfile价值不大。

redis

redis目前只用来存了token,但是之后会做一层SortedSet缓存,目前正在做得后端插件化就是为了方便做这个缓存。

另外,之前准备用redis来做rpc得,不过后面权衡了一下发现效果肯定没有SSR直连数据库好,就算了

前端别的代码

前端所有别的代码全部都是SSR服务端渲染相关的,为了解决SEO和降首屏时间。前端的SSR服务端与后端没有冲突。 你所看到的前端直连数据库是比较极端但很适合本项目的优化SSR的手段。

贡献代码

这里先提前感谢了,其实目前项目进度是这样的,后端我准备做成提供类似webpack打包生命周期,然后在一个server.config.js里面通过webpack插件的形式一个一个把功能像拼积木一样拼接上去,之后再加强一下后台管理前端的地位,让用户可以直接在界面上直接选要用哪些插件,甚至可以选择npm上的插件包,这样子以后加功能也用不着提PR了,直接发一个npm包就行了。然后GUI上配好的配置直接写回数据库,再通过模板引擎把后端配置文件server.config.js直接渲染回来,这样改造后,所有东西都在mongo数据库里,之后无论对用户用户还是对开发者开发,都会方便很多。

上面的想法前几天才成型,之后会一直往这个方向做。做完之后贡献代码就方便得多了,我个人建议可以等到那个时候。

时间不会太久,因为这个项目是我的毕设😅,还剩一个多月就答辩了,我肯定会最近干完。

from blog.

qfdk avatar qfdk commented on July 20, 2024

@smallpath 好的 现在明白了初衷和发展发方向,那这个项目我先马克,等你答辩完成之后再来贡献.

祝答辩顺利 🏆

还有一点儿想到的 redis 和 mongo 似乎要准备一下密码或者权限,最近被删库跑路的比较多.

from blog.

smallpath avatar smallpath commented on July 20, 2024

了解,redis设置了auth环境变量,mongo我也加一下

from blog.

Siubaak avatar Siubaak commented on July 20, 2024

研读了一下代码,写得比我好多了......

有个问题,不知道是不是笔误,想问一下。在server/plugins/beforeUseRoutes/logTime.js里,module.exports = module.exports = ...... 为什么module.exports连续赋值了?

from blog.

smallpath avatar smallpath commented on July 20, 2024

@Siubaak 确实是笔误, 刚刚已经修掉了

from blog.

qfdk avatar qfdk commented on July 20, 2024

时隔两个月 @smallpath 我又来了,话说后端什么时候重构代码? 准备休年假 怕无聊,看看你这边啥时候搞点儿动作啥的。

from blog.

smallpath avatar smallpath commented on July 20, 2024

@qfdk 🤣毕设论文码了接近三万字所以有点伤,现在差不多缓过来了吗,应该会马上做如下两件事:

  • 升vue2.4
    • 用上字符串模板,预计压测QPS能从100到110
  • 验证码
    • 用node-pnglib配合redis在后端做一个验证码服务,先用在后台管理的登录上,后期插件系统弄完了再用在插件系统的登录上
  • 插件系统
    • 还是之前的设想,插件的信息全部存在数据库里,每次运行时构建一份新的blogpack文件

from blog.

smallpath avatar smallpath commented on July 20, 2024

哦对了,应该还会再写一个类似hexo-theme-material的material design的前端,完成后再导出给firekylin用,不过得上面全部搞完再弄了

from blog.

geekplux avatar geekplux commented on July 20, 2024

现在评论系统还是必须翻墙才能加载出来,能不能做成类似 ququ 博客的效果?https://imququ.com/post/back-to-disqus.html

from blog.

geekplux avatar geekplux commented on July 20, 2024

其实可以在 README 里把你目前的备份方式也写一下? (小建议

from blog.

geekplux avatar geekplux commented on July 20, 2024

@smallpath 我觉得用 service worker 可行。

from blog.

flyguolai avatar flyguolai commented on July 20, 2024

非常感谢源码的提供,3Q~虽然作为和你一样的应届生但是你的代码写的比我好太多了,学习一哈,非常感谢~

作为实战能找到一个优秀的项目来借鉴和提升自己实在是太感谢了,非常感谢源码的提供~

from blog.

Related Issues (16)

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.