biaochenxuying / Blog Node
Licence: mit
基于 node + express + mongodb 的博客网站后台
Stars: ✭ 364
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Blog Node
Nodepress
😎 RESTful API service for Blog/CMS, powered by @nestjs
Stars: ✭ 829 (+127.75%)
Mutual labels: blog, mongoose, mongodb, express
Vue Node Pastime
😄 基于vue全家桶、nodejs和mongodb的前后端整合项目
Stars: ✭ 200 (-45.05%)
Mutual labels: mongoose, mongodb, express
Bulletproof Nodejs
Implementation of a bulletproof node.js API 🛡️
Stars: ✭ 4,369 (+1100.27%)
Mutual labels: mongoose, mongodb, express
Securing Restful Apis With Jwt
How to secure a Nodejs RESTful CRUD API using JSON web tokens?
Stars: ✭ 301 (-17.31%)
Mutual labels: mongoose, mongodb, express
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (-20.88%)
Mutual labels: mongoose, mongodb, express
Node Rem
Node REM - NodeJS Rest Express MongoDB and more: typescript, passport, JWT, socket.io, HTTPS, HTTP2, async/await, nodemailer, templates, pagination, docker, etc. Live Demo: https://node-rem-ngduc.vercel.app
Stars: ✭ 192 (-47.25%)
Mutual labels: mongoose, mongodb, express
Nodejs Restful Api
How to create a RESTful CRUD API using Nodejs?
Stars: ✭ 285 (-21.7%)
Mutual labels: mongoose, mongodb, express
Ecommerce Site Template
A beautiful e-commerce template powered by React, Redux and other modern web tech.
Stars: ✭ 167 (-54.12%)
Mutual labels: mongoose, mongodb, express
Nest Angular
NestJS, Angular 6, Server Side Rendering (Angular Universal), GraphQL, JWT (JSON Web Tokens) and Facebook/Twitter/Google Authentication, Mongoose, MongoDB, Webpack, TypeScript
Stars: ✭ 307 (-15.66%)
Mutual labels: mongoose, mongodb, express
Express Mongoose Es6 Rest Api
💥 A boilerplate application for building RESTful APIs Microservice in Node.js using express and mongoose in ES6 with code coverage and JsonWebToken Authentication
Stars: ✭ 2,811 (+672.25%)
Mutual labels: mongoose, mongodb, express
Node.js
一步一步学习Node.js,带你从零开始学习Node.js!本仓库是自己总结的Node.js学习图文教程,里面有学习案列和源代码(pubdreamcc原创,欢迎转载,欢迎star)
Stars: ✭ 181 (-50.27%)
Mutual labels: mongoose, mongodb, express
Intro To Graphql
[Course] Introduction to GraphQL
Stars: ✭ 175 (-51.92%)
Mutual labels: mongoose, mongodb, express
Saas
Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript.
Stars: ✭ 2,720 (+647.25%)
Mutual labels: mongoose, mongodb, express
Next Graphql Blog
🖊 A Blog including a server and a client. Server is built with Node, Express & a customized GraphQL-yoga server. Client is built with React, Next js & Apollo client.
Stars: ✭ 152 (-58.24%)
Mutual labels: mongoose, mongodb, express
Frisky
🍿 Open Source GraphQL API for Online Shows
Stars: ✭ 161 (-55.77%)
Mutual labels: mongoose, mongodb, express
Typescript Express Starter
🚀 TypeScript Express Starter
Stars: ✭ 238 (-34.62%)
Mutual labels: mongoose, mongodb, express
前言
blog-node 是采用了主流的前后端分离思想的,主里只讲 后端。
效果请看 https://biaochenxuying.cn
项目详情请看这篇文章:基于 node + express + mongodb 的 blog-node 项目文档说明
已经实现功能
- [x] 登录
- [x] 文章管理
- [x] 标签管理
- [x] 评论
- [x] 留言管理
- [x] 用户管理
- [x] 友情链接管理
- [x] 时间轴管理
- [x] 身份验证
- [x] 项目展示
- [x] 第三方 github 授权登录
- [x] 文章归档
待实现功能
- [ ] 个人中心(用来设置博主的各种信息)
- [ ] 工作台( 接入百度统计接口,查看网站浏览量和用户访问等数据 )
技术
- node
- cookie-parser : "~1.4.3"
- crypto : "^1.0.1"
- express: "~4.16.0"
- express-session : "^1.15.6",
- http-errors : "~1.6.2",
- mongodb : "^3.1.8",
- mongoose : "^5.3.7",
- mongoose-auto-increment : "^5.0.1",
- yargs : "^12.0.2"
注意点
- 文章是分类型的:文章类型 => 1: 普通文章,2: 简历,3: 管理员介绍;而且简历和管理员介绍的文章只能是各自一篇(因为前台展示那里有个导航 关于我 ,就是请求管理员介绍这篇文章的,简历也是打算这样子用的),普通文章可以是无数篇。
- 点赞的用户 like_users 那里应该只保存用户 id 的,这个后面修改一下。
- 评论功能是实现了简单的三级评论的,第三者的评论(就是别人对一级评论进行再评论)放在 other_comments 里面。
- 评论是有状态的:状态 => 0 待审核 / 1 通过正常 / -1 已删除 / -2 垃圾评论。
- 管理一级和三级评论是设置前台能不能展示的,默认是展示,如果管理员看了,是条垃圾评论就 设置为 -1 或者 -2 ,进行隐藏,前台就不会展现了。
Build Setup ( 构建安装 )
# install dependencies
npm install
# serve with hot reload at localhost: 3000
npm start
# build for production with minification
请使用 pm2 ,可以永久运行在服务器上,且不会一报错 node 程序就挂了。
项目常见问题
管理后台登录
管理后台登录是用 邮箱加密码 进行登录
管理员账号创建
管理后台的登录账号并不是 admin/user ,也不是搭建 mongodb 数据库时创建的 user 用户,这里的账号和密码要自己创建,至于怎样创建呢?
用 postman 调接口注册
如果是本地的可以像这样子创建,如果是服务器上的,请把 url 修改一下,
-
- url
http://127.0.0.1:3000/register
-
- param
{
"name": "BiaoChenXuYing",
"password": "888888",
"email": "[email protected]",
"phone": 1380013800,
"type": 0,
"introduce":"加班到天明,学习到昏厥!!! 微信公众号:【 BiaoChenXuYing 】,分享 WEB 全栈开发等相关的技术文章,热点资源,全栈程序员的成长之路。"
}
这里的 type 为 0 是管理员账号,为 1 时,是普通用户。
项目地址与文档教程
项目地址:
本博客系统的系列文章:
服务器
笔者觉得每个开发者都应该拥有自己的网站和服务器,这可是很酷的事情,学习 Linux、跑跑脚本、建站、搭博客啥的都行啊。
因为笔者就有自己的服务器,而且有两台了,用于平时的学习,还搭建了自己的网站。
有不少读者问过我,为什么我学的那么快的呢 ? 怎么在一年内学了那么知识的...
其实也没什么秘决,就是平时有自己的服务器了,就爱折腾,学到的知识能很快得到验证,所以学起来兴致高一点。
特别是大三和大四的学生,买了服务器,搭建个项目给面试官看也香,对找工作和面试都加分,还可以熟悉技术栈。
想学得快,就得有自己的服务器来折腾才行(低于 1 折、89/年、229/3年,比学生机还便宜)
比如笔者的两个网站:
最后
如果您觉得本项目和文章不错或者对你有所帮助,请给个星吧,你的肯定就是我继续创作的最大动力。
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].