1 Star 0 Fork 0

doramart / mmf-blog-vue2-pwa-ssr

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

mmf-blog vuejs 2.0 服务端渲染 v2版

Test

demo: http://www.mmxiaowu.com

说明

本站服务端采用 express + mongoDB 搭建, 客户端采用 Vue2 的服务端渲染搭建

主要功能包括: 管理员, 用户, 分类, 文章, 评论, 文章点赞

主要技术栈: express, mongoose, vue2, vue2-router, vuex, webpack, babel, eslint


其他版本

react spa版本: https://github.com/dora/mmf-blog-react-v2

vue2 spa版本: https://github.com/dora/mmf-blog-vue2

vue2 ssr版本: https://github.com/dora/mmf-blog-vue2-ssr

vue2 pwa ssr版本: https://github.com/dora/mmf-blog-vue2-pwa-ssr


配置文件: src/api/config-client.js (浏览器端)
api: api地址 (如果 api 服务器和网站服务器是同一个域名, 或者用了反向代理, 可以直接用省去域名的绝对路径, 如: /api/)
配置文件: src/api/config-server.js (服务器端)
api: api地址 (如果 api 服务器 和网站服务器在同一台主机, 可以用本地地址, 如: http://localhost:8080)
port: 启动端口

准备工作:

安装 NodeJS: https://nodejs.org/zh-cn/

安装 Mongodb: https://www.mongodb.com/download-center#community

# 安装依赖
$ npm install

# 或者
$ yarn
# 注意: 不要用 cnpm 安装依赖

# 开发模式
$ npm run dev

# 生产模式
$ npm run build

# 启动(需先运行 npm run build )
$ npm run start

首页 http://localhost:8080

登录 http://localhost:8080/backend

添加管理员 http://localhost:8080/api/backend

管理员添加成功后, 会自动生成 admin.lock 文件锁定, 如果需要继续添加, 请把该文件删除

loadtest 测试

[Sat Jul 15 2017 10:53:20] INFO Requests: 0 (0%), requests per second: 0, mean latency: 0 ms
[Sat Jul 15 2017 10:53:25] INFO Requests: 356 (18%), requests per second: 71, mean latency: 14 ms
[Sat Jul 15 2017 10:53:30] INFO Requests: 804 (40%), requests per second: 90, mean latency: 11.1 ms
[Sat Jul 15 2017 10:53:35] INFO Requests: 1290 (65%), requests per second: 97, mean latency: 10.2 ms
[Sat Jul 15 2017 10:53:40] INFO Requests: 1764 (88%), requests per second: 95, mean latency: 10.6 ms
[Sat Jul 15 2017 10:53:43] INFO
[Sat Jul 15 2017 10:53:43] INFO Target URL:          http://localhost:8080/
[Sat Jul 15 2017 10:53:43] INFO Max requests:        2000
[Sat Jul 15 2017 10:53:43] INFO Concurrency level:   1
[Sat Jul 15 2017 10:53:43] INFO Agent:               none
[Sat Jul 15 2017 10:53:43] INFO
[Sat Jul 15 2017 10:53:43] INFO Completed requests:  2000
[Sat Jul 15 2017 10:53:43] INFO Total errors:        0
[Sat Jul 15 2017 10:53:43] INFO Total time:          22.645280754999998s
[Sat Jul 15 2017 10:53:43] INFO Requests per second: 88
[Sat Jul 15 2017 10:53:43] INFO Mean latency:        11.3 ms
[Sat Jul 15 2017 10:53:43] INFO
[Sat Jul 15 2017 10:53:43] INFO Percentage of the requests served within a certain time
[Sat Jul 15 2017 10:53:43] INFO   50%      8 ms
[Sat Jul 15 2017 10:53:43] INFO   90%      17 ms
[Sat Jul 15 2017 10:53:43] INFO   95%      27 ms
[Sat Jul 15 2017 10:53:43] INFO   99%      38 ms
[Sat Jul 15 2017 10:53:43] INFO  100%      438 ms (longest request)

LICENSE

MIT

MIT License Copyright (c) 2017 dora Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

doracms-ssr 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/doramart/mmf-blog-vue2-pwa-ssr.git
git@gitee.com:doramart/mmf-blog-vue2-pwa-ssr.git
doramart
mmf-blog-vue2-pwa-ssr
mmf-blog-vue2-pwa-ssr
master

搜索帮助