xu-weixin / MiniBlog

A mini-blog SPA using React and Redux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MiniBlog

A mini-blog SPA using React and Redux. Use json-server to generate fake datas like

{
  "posts": [
    {
      "id": 1,
      "title": "Sunny Days",
      "categories": "Weather",
      "content": "This is a sunny day."
    },
    {
      "id": 2,
      "title": "Cloudy Days",
      "categories": "Weather",
      "content": "I had a bad mood."
    },
    {
      "id": 3,
      "title": "Birthday",
      "categories": "Diary",
      "content": "Happy birthday to you."
    }
  ]
}

To start the server, first you need to install the json-server using npm install -g json-server.next, save datas above as ##db.json##(the file name should end using '.json'), then use command to start the server:

json-server db.json

Finally, visit localhost:3000/posts to get datas.

Getting Started

Click here then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:

> npm install
> npm start

About

A mini-blog SPA using React and Redux

License:MIT License


Languages

Language:JavaScript 95.9%Language:HTML 3.4%Language:CSS 0.7%