Skip to content

使用 json-server 套件快速建立假的 api server

Notifications You must be signed in to change notification settings

ReactMaker/api_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Server

使用json-server套件快速建置Fake REST API DEMO時會使用這裡的API呈現畫面

特色

需求配置

  • node ^4.5.0
  • npm ^3.0.0

開始

先確定好安裝了 node 4.5 以上的版本,接著就可以輸入以下指令

$ git clone https://github.com/ReactMaker/api_server.git
$ cd api_server
$ npm install                   # Install project dependencies
$ npm start                     # Compile and launch

如果一切成功,就會看到以下畫面

Imgur

怎麼放新的資料進去

  1. 將新的 json 放入 db/ 資料夾內 (必須式陣列型態的)
  2. 修改 db.js

About

使用 json-server 套件快速建立假的 api server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published