All Projects → zce → Dashboard Server

zce / Dashboard Server

Licence: mit
A JSON file RESTful API with authorization based on json-server

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Dashboard Server

Gores
Go package that handles HTML, JSON, XML and etc. responses
Stars: ✭ 94 (+95.83%)
Mutual labels:  rest-api, restful, json-api
X Restful Api Generator Koa
一个基于 Koa 的 RESTful API 服务脚手架。 A RESTful API generator for Koa
Stars: ✭ 18 (-62.5%)
Mutual labels:  restful, jwt, jsonwebtoken
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (+204.17%)
Mutual labels:  rest-api, restful, jwt
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (+2.08%)
Mutual labels:  rest-api, restful, fake
Ssm
👅基于RESTful风格的前后端分离的SSM框架,集成了shiro和swagger等框架
Stars: ✭ 141 (+193.75%)
Mutual labels:  rest-api, restful, jwt
Codeigniter Jwt Sample
CodeIgniter JWT Sample
Stars: ✭ 144 (+200%)
Mutual labels:  rest-api, restful, jwt
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (+427.08%)
Mutual labels:  rest-api, restful, fake
Geek Framework
基于SpringBoot+Shiro+Redis+Jwt+Thymeleaf+MyBatis 开发的后台用户、角色、权限、会员管理、RestFul、Token和前台用户登录注册以及前后台用户分离的脚手架,技术交流请加QQ群:805442966
Stars: ✭ 804 (+1575%)
Mutual labels:  jwt, jsonwebtoken
Gen
Converts a database into gorm structs and RESTful api
Stars: ✭ 825 (+1618.75%)
Mutual labels:  rest-api, restful
Jose
Universal "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK with no dependencies
Stars: ✭ 1,029 (+2043.75%)
Mutual labels:  jwt, jsonwebtoken
Farwest
Framework for building RESTful HATEOAS-driven applications.
Stars: ✭ 18 (-62.5%)
Mutual labels:  rest-api, restful
Python Api Development Fundamentals
Develop a full-stack web application with Python and Flask
Stars: ✭ 44 (-8.33%)
Mutual labels:  restful, jwt
Spring Boot Jwt
JWT auth service using Spring Boot, Spring Security and MySQL
Stars: ✭ 795 (+1556.25%)
Mutual labels:  jwt, jsonwebtoken
Core
Pluf is an open source PHP framework, which is very light and fast.
Stars: ✭ 6 (-87.5%)
Mutual labels:  rest-api, restful
Ngx Restangular
Restangular for Angular 2 and higher versions
Stars: ✭ 787 (+1539.58%)
Mutual labels:  rest-api, restful
Apidoc
RESTful API 文档生成工具,支持 Go、Java、Swift、JavaScript、Rust、PHP、Python、Typescript、Kotlin 和 Ruby 等大部分语言。
Stars: ✭ 785 (+1535.42%)
Mutual labels:  rest-api, restful
Go Book Store Api
Go Sample project to understand Mysql CRUD operation with best practises Includes logging, JWT, Swagger and Transactions
Stars: ✭ 18 (-62.5%)
Mutual labels:  rest-api, jwt
Jwt Example
Playing with user registration, login/logout, auth, etc using JWTs, serverless functions & faunadb as the data store.
Stars: ✭ 22 (-54.17%)
Mutual labels:  now, jwt
Tns Restful Json Api
This is the code repository that goes along with the "TheNewStack" article for RESTful JSON API post
Stars: ✭ 846 (+1662.5%)
Mutual labels:  restful, json-api
Go Base
Go RESTful API Boilerplate with JWT Authentication backed by PostgreSQL
Stars: ✭ 928 (+1833.33%)
Mutual labels:  restful, jwt

dashboard-server

Build Status Dependency Status devDependency Status Code Style

A JSON file RESTful API with authorization based on json-server for zce/dashboard

Usage

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

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

# install dependencies
$ yarn # or npm install

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

JWT Authorization Endpoints

with jsonwebtoken

POST /tokens

create token

# Content-type: x-www-form-urlencoded
$ curl -X POST -d "username=zce&password=wanglei" http://localhost:3000/tokens
# Content-type: application/json
$ curl -X POST -H "Content-type: application/json" -d "{\"username\":\"zce\",\"password\":\"wanglei\"}" http://localhost:3000/tokens

request body

{ username: 'zce', password: 'wanglei' }

GET /tokens

check token

$ curl -H "Authorization: Bearer <jwt-string>" http://localhost:3000/tokens

request headers

{
  headers: { Authorization: 'Bearer <jwt-string>' }
}

DELETE /tokens

revoke token

$ curl -X DELETE -H "Authorization: Bearer <jwt-string>" http://localhost:3000/tokens

request headers

{
  headers: { Authorization: 'Bearer <jwt-string>' }
}

JSON Server Resources Endpoints

  • Comments: /comments/:id?
  • Posts: /posts/:id?
  • Terms: /terms/:id?
  • Users: /users/:id?
  • Options: /options/:id?

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

Additional Endpoints

GET /users/me

get current login user information

$ curl -H "Authorization: Bearer <jwt-string>" http://localhost:3000/users/me

request headers

{
  headers: { Authorization: 'Bearer <jwt-string>' }
}

Backdoor Endpoints

GET /backdoor/reset

reset the database to its initial state

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

GET /backdoor/delay

add a delay of 1000ms for each endpoint

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

Related

License

MIT © 汪磊

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].