Git Product home page Git Product logo

koa2-blog's Introduction

Koa2-blog

node+koa2+mysql (欢迎star)

教程 Node+Koa2+Mysql 搭建简易博客

创建数据库

登录数据库

$ mysql -u root -p

创建数据库

$ create database nodesql;

使用创建的数据库

$ use nodesql;

database: nodesql tables: users posts comment (已经在lib/mysql建表)

users   posts   comment
id       id       id  
name       name       name  
pass       title       content  
      content       postid  
      uid        
      moment        
      comments        
      pv        
  • id主键递增
  • name: 用户名
  • pass:密码
  • title:文章标题
  • content:文章内容和评论
  • moment:创建时间
  • comments:文章评论数
  • pv:文章浏览数
  • postid:文章id
$ git clone https://github.com/wclimb/Koa2-blog.git
$ cd Koa2-blog
$ cnpm i supervisor
$ cnpm i 
$ npm run dev(运行项目)
$ npm test(测试项目)

演示

注册

登陆

发表文章

文章详情

文章列表

个人文章页以及正常编辑删除文章和评论

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.