Skip to content

illuca/react-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Structure

$project
├── README.md
├── admin
├── blog
└── service

How to run

First create database 'react-blog' using mysql:

create table admin_user
(
    username varchar(50) null,
    password varchar(50) null,
    id       int auto_increment
        primary key
);

create table type
(
    id        int auto_increment
        primary key,
    type_name varchar(50) null,
    `order`   int         null
);

create table article
(
    id           int auto_increment
        primary key,
    type_id      int          not null,
    title        varchar(100) null,
    content      text         null,
    introduction text         null,
    create_time  datetime     null,
    view_count   int          null,
    constraint article_type_null_fk
        foreign key (type_id) references type (id)
)


CREATE TABLE `file` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL COMMENT '文件名',
  `md5` varchar(32) DEFAULT NULL COMMENT 'MD5值',
  `path` varchar(100) NOT NULL COMMENT '文件路径',
  `upload_time` datetime(3) NOT NULL COMMENT '上传时间',
  `ext` varchar(255) DEFAULT NULL COMMENT '文件后缀名',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
cd $project/service
npm install
npm run start

cd $project/admin
npm install
npm run start

cd $project/blog
npm install
npm run start

Features

back end management

list articles:

image-20240522234326473

add article:

image-20240522234351982

User page

home page list:

image-20240522235003255

markdown display:

image-20240522234914380

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published