Skip to content

A JSON file RESTful API based on json-server for zce/weapp-locally & zce/quickapp-locally

License

Notifications You must be signed in to change notification settings

zce/locally-server

Repository files navigation

locally-server

Build Status Dependency Status devDependency Status Code Style

A JSON file RESTful API with authorization based on json-server for zce/weapp-locally & zce/quickapp-locally

Usage

# clone repo
$ git clone https://github.com/zce/locally-server.git <my-api-server>

# change directory
$ cd <my-api-server>

# install dependencies
$ yarn # or npm install

modify database.json file

# serve with hot reload at http://localhost:3000
$ yarn dev

JSON Server Resources Endpoints

  • Slides: /slides/:id?
  • Categories: /categories/:id?
  • Shops: /shops/:id?

To access and modify resources, you can use any HTTP method: GET POST PUT PATCH DELETE OPTIONS

Backdoor Endpoints

GET /backdoor/delay

add a delay of 1000ms for each endpoint

$ curl http://localhost:3000/backdoor/delay

Related

License

MIT © 汪磊

About

A JSON file RESTful API based on json-server for zce/weapp-locally & zce/quickapp-locally

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published