web server博客项目

  1. Node.js 从零开发 web server博客项目[项目介绍]
  2. Node.js 从零开发 web server博客项目[接口]
  3. Node.js 从零开发 web server博客项目[数据存储]
  4. Node.js 从零开发 web server博客项目[登录]
  5. Node.js 从零开发 web server博客项目[日志]
  6. Node.js 从零开发 web server博客项目[安全]
  7. Node.js 从零开发 web server博客项目[express重构博客项目]
  8. Node.js 从零开发 web server博客项目[koa2重构博客项目]
  9. Node.js 从零开发 web server博客项目[上线与配置]

项目需求

  • 首页 , 作者主页 , 博客详情页
  • 登录页
  • 管理中心 , 新建页 , 编辑页

技术方案

数据存储

  • 博客

id title constent createtime author
1 标题1 内容1 1542512945445 张三
2 标题2 内容2 1542511215145 李四
  • 用户

id username password realname
1 zhangsan 1234 张三
2 lisi 0000 李四

接口设计

描述 接口 方法 url参数 备注
获取博客列表 /api/blog/list get author作者, keyword 搜索关键字 参数为空的话, 则不进行查询过滤
获取一篇博客的内容 /api/blog/detail get id
新增一篇博客 /api/blog/new post post中有新增的信息
更新一篇博客 /api/blog/update post id postData 中有更新的内容
删除一篇博客 /api/blog/del post id
登录 /api/user/login post postData 中有用户名和密码

开发接口(不用任何框架)

  • nodejs 处理 http 请求

  • 搭建开发环境

  • 开发接口(暂不连接数据库, 暂不考虑登录)

postman json文件

{
"id": "9b059257-accf-6ced-b372-c8b2c1a593bf",
"name": "Node.js 从零开发 web server博客项目 前端晋升全栈工程师必备",
"description": "",
"order": [
"53fadbd2-4bf8-d99c-c4bc-2bad9a9acc4a",
"e9955442-b3a0-270c-5e01-a5a6a3c91e60",
"b13f5e19-ab33-3c9f-63cd-5366015761d6",
"34d0396f-00a4-1691-23ad-ae1de6136fda",
"f24bb99d-dd8c-c181-5d44-9227d7066902",
"e52e4d10-bc5a-685d-77db-bf13871848f6"
],
"folders": [],
"folders_order": [],
"timestamp": 1562430570180,
"owner": "7741397",
"public": false,
"requests": [
{
"id": "34d0396f-00a4-1691-23ad-ae1de6136fda",
"headers": "Content-Type: application/json\n",
"headerData": [
{
"key": "Content-Type",
"value": "application/json",
"description": "",
"enabled": true
}
],
"url": "localhost:9527/api/blog/update?id=7",
"queryParams": [
{
"key": "id",
"value": "7",
"equals": true,
"description": "",
"enabled": true
}
],
"preRequestScript": null,
"pathVariables": {},
"pathVariableData": [],
"method": "POST",
"data": [],
"dataMode": "raw",
"tests": null,
"currentHelper": "normal",
"helperAttributes": {},
"time": 1562438278080,
"name": "更新一篇博客",
"description": "",
"collectionId": "9b059257-accf-6ced-b372-c8b2c1a593bf",
"responses": [],
"rawModeData": "{\n\t\"title\": \"文章c\",\n\t\"content\": \"内容c\"\n}"
},
{
"id": "53fadbd2-4bf8-d99c-c4bc-2bad9a9acc4a",
"headers": "",
"headerData": [],
"url": "localhost:9527/api/blog/list?keyword=2",
"queryParams": [
{
"key": "keyword",
"value": "2",
"equals": true,
"description": "",
"enabled": true
}
],
"preRequestScript": null,
"pathVariables": {},
"pathVariableData": [],
"method": "GET",
"data": null,
"dataMode": "params",
"tests": null,
"currentHelper": "normal",
"helperAttributes": {},
"time": 1562435228053,
"name": "获取博客列表",
"description": "",
"collectionId": "9b059257-accf-6ced-b372-c8b2c1a593bf",
"responses": []
},
{
"id": "b13f5e19-ab33-3c9f-63cd-5366015761d6",
"headers": "Content-Type: application/json\n",
"headerData": [
{
"key": "Content-Type",
"value": "application/json",
"description": "",
"enabled": true
}
],
"url": "localhost:9527/api/blog/new",
"queryParams": [],
"preRequestScript": null,
"pathVariables": {},
"pathVariableData": [],
"method": "POST",
"data": [],
"dataMode": "raw",
"tests": null,
"currentHelper": "normal",
"helperAttributes": {},
"time": 1562438281853,
"name": "新增一篇博客",
"description": "",
"collectionId": "9b059257-accf-6ced-b372-c8b2c1a593bf",
"responses": [],
"rawModeData": "{\n\t\"title\": \"文章B\",\n\t\"content\": \"内容B\"\n}"
},
{
"id": "e52e4d10-bc5a-685d-77db-bf13871848f6",
"headers": "Content-Type: application/json\n",
"headerData": [
{
"key": "Content-Type",
"value": "application/json",
"description": "",
"enabled": true
}
],
"url": "localhost:9527/api/user/login",
"queryParams": [],
"pathVariables": {},
"pathVariableData": [],
"preRequestScript": null,
"method": "POST",
"collectionId": "9b059257-accf-6ced-b372-c8b2c1a593bf",
"data": [],
"dataMode": "raw",
"name": "登录",
"description": "",
"descriptionFormat": "html",
"time": 1562439940328,
"version": 2,
"responses": [],
"tests": null,
"currentHelper": "normal",
"helperAttributes": {},
"rawModeData": "{\n\t\"username\": \"zhangsan\",\n\t\"password\": 123\n}"
},
{
"id": "e9955442-b3a0-270c-5e01-a5a6a3c91e60",
"headers": "",
"headerData": [],
"url": "http://localhost:9527/api/blog/detail?id=2",
"queryParams": [
{
"key": "id",
"value": "2",
"equals": true,
"description": "",
"enabled": true
}
],
"pathVariables": {},
"pathVariableData": [],
"preRequestScript": null,
"method": "GET",
"collectionId": "9b059257-accf-6ced-b372-c8b2c1a593bf",
"data": null,
"dataMode": "params",
"name": "获取一篇博客的内容",
"description": "",
"descriptionFormat": "html",
"time": 1562435340139,
"version": 2,
"responses": [],
"tests": null,
"currentHelper": "normal",
"helperAttributes": {}
},
{
"id": "f24bb99d-dd8c-c181-5d44-9227d7066902",
"headers": "Content-Type: application/json\n",
"headerData": [
{
"key": "Content-Type",
"value": "application/json",
"description": "",
"enabled": true
}
],
"url": "localhost:9527/api/blog/del?id=7",
"queryParams": [
{
"key": "id",
"value": "7",
"equals": true,
"description": "",
"enabled": true
}
],
"pathVariables": {},
"pathVariableData": [],
"preRequestScript": null,
"method": "POST",
"collectionId": "9b059257-accf-6ced-b372-c8b2c1a593bf",
"data": [],
"dataMode": "raw",
"name": "删除一篇博客",
"description": "",
"descriptionFormat": "html",
"time": 1562439876334,
"version": 2,
"responses": [],
"tests": null,
"currentHelper": "normal",
"helperAttributes": {},
"rawModeData": "{\n\t\"author\": \"zhangsan\"\n}"
}
]
}

Node.js 从零开发 web server博客项目[项目介绍]的更多相关文章

  1. Node.js 从零开发 web server博客项目[express重构博客项目]

    web server博客项目 Node.js 从零开发 web server博客项目[项目介绍] Node.js 从零开发 web server博客项目[接口] Node.js 从零开发 web se ...

  2. Node.js 从零开发 web server博客项目[数据存储]

    web server博客项目 Node.js 从零开发 web server博客项目[项目介绍] Node.js 从零开发 web server博客项目[接口] Node.js 从零开发 web se ...

  3. Node.js 从零开发 web server博客项目[koa2重构博客项目]

    web server博客项目 Node.js 从零开发 web server博客项目[项目介绍] Node.js 从零开发 web server博客项目[接口] Node.js 从零开发 web se ...

  4. Node.js 从零开发 web server博客项目[安全]

    web server博客项目 Node.js 从零开发 web server博客项目[项目介绍] Node.js 从零开发 web server博客项目[接口] Node.js 从零开发 web se ...

  5. Node.js 从零开发 web server博客项目[日志]

    web server博客项目 Node.js 从零开发 web server博客项目[项目介绍] Node.js 从零开发 web server博客项目[接口] Node.js 从零开发 web se ...

  6. Node.js 从零开发 web server博客项目[登录]

    web server博客项目 Node.js 从零开发 web server博客项目[项目介绍] Node.js 从零开发 web server博客项目[接口] Node.js 从零开发 web se ...

  7. Node.js 从零开发 web server博客项目[接口]

    web server博客项目 Node.js 从零开发 web server博客项目[项目介绍] Node.js 从零开发 web server博客项目[接口] Node.js 从零开发 web se ...

  8. Vue+node.js实现一个简洁的个人博客系统

    本项目是一个用vue和node以及mysql实现的一个简单的个人博客系统,整体逻辑比较简单.但是可以我们完整的了解一个项目从数据库到后端到前端的实现过程,适合不太懂这一块的朋友们拿来练手. 本项目所用 ...

  9. github pages + Hexo + node.js 搭建属于自己的个人博客网站

     之前我写过一篇用Github实现个人主页的博客:https://www.cnblogs.com/tu-0718/p/8081288.html   后来看到某个大佬写的文章:[5分钟 0元搭建个人独立 ...

随机推荐

  1. max user processes 导致的服务器大量close_wait问题解决过程

    1.背景: 由于现网业务量增长过快,需要扩容应用程序服务器,分担来自前端的访问压力. 2.故障: 部署好业务启动程序后,发现程序运行一小会后不产生新的日志和数据. 3.查问题过程: 1.首先查看程序运 ...

  2. centos 安装vimplus

    参考链接:https://www.jianshu.com/p/75cde8a80fd7 git clone https://github.com/chxuan/vimplus.git ~/.vimpl ...

  3. neutron plugin 笔记

    neutron-plugin 分为 core-plugin 和 service-plugin 两类 L2-L3称为core plugin,包含network.subnet.portL4-L7称为ser ...

  4. 对于CSS里面我之前不太清楚的伪类,我做一些总结

    格式: 标签 + : + 参数 +{ 可填背景颜色,字体颜色,鼠标样式,加粗等 } a:hover{ color:#f40;} :link表示鼠标点击之前的样式 :hover表示鼠标放上去的样式 :a ...

  5. Shell编程—图形化脚本

    1创建文本菜单 1.1普通的文本菜单 $ cat menu1 #!/bin/bash # simple script menu function diskspace { clear df -k } f ...

  6. Java多线程_同步工具CyclicBarrier

    CyclicBarrier概念:CyclicBarrier是多线程中的一个同步工具,它允许一组线程互相等待,直到到达某个公共屏障点.形象点儿说,CyclicBarrier就是一个屏障,要求这一组线程中 ...

  7. Gradle Wrapper

    Gradle Wrapper 当把本地一个项目放入到远程版本库的时候,如果这个项目是以gradle构建的,那么其他人从远程仓库拉取代码之后如果本地没有安装过gradle会无法编译运行,如果对gradl ...

  8. 《spring源码解读》 - ioc之验证模型获取

    我们上一篇文章最后调用到 `org.springframework.beans.factory.xml. XmlBeanDefinitionReader#doLoadDocument(...) ` 方 ...

  9. Android 引入第三方类库

  10. C++算法 线段树

    线段树这个算法,看起来非常高端,而且很有用处,所以还是讲一下下吧. 温馨提示:写线段树前请做好写码5分钟,调试一辈子的准备^-^ 啊直接步入正题…… 首先我们考虑一个题目:有一个序列,要做到单点修改单 ...