Giter Club home page Giter Club logo

restful-api-example's Introduction

RESTful API Example Project

This repository has many language programming with the same proposition.

Language/Framework

No. Language / Framework IDE Contributor Progress Etc.
1. Node.js / Express Visual Studio Code first087 Done Node.js 8.8.1
2. Node.js / Hapi Visual Studio Code first087 Done Node.js 8.8.1
3. Java / Spring Boot IntelliJ IDEA first087 Done JDK or OpenJDK 8+ / Gradle 3.5.1 / Spring Boot 1.5.8.RELEASE
4. Kotlin / Spring Boot IntelliJ IDEA first087 Done JDK or OpenJDK 8+ / Gradle 3.5.1 / Spring Boot 1.5.8.RELEASE
Go / ... Need You!
Python / ... Want You!
php / ... Need You!
C# .NET Core / ... ...
... And You!

Proposition

Define store for save item type Array of String and initial value is Init item

Method Route Request body (JSON) Response body (JSON) Success (HTTP Status) Fail (HTTP Status) Description
GET /item/ {"items":["Init item",...]} 200 Get all items
GET /item/{index} {"item":"Init item"} 200 404 Get item by index
POST /item/ {"item":"New item"} 201 400 Add item
PUT /item/{index} {"item":"Update item"} {"oldItem":"Old item"} 200 400/404 Update item by index
DELETE /item/{index} {"removeItem":"Remove item"} 200 404 Delete item by index
  • HTTP Status 400 when bad input
  • HTTP Status 404 when index out of range

Optional

  1. Create Dockerfile for build docker image for your app.
  2. Add service in docker compose (docker-compose.yml)
  3. Config reverse proxy in NGINX (nginx/conf.d/route.d/)

Welcome to Fork

  1. Develop on your branch, create branch from master.
  2. Create pull request to branch dev.

restful-api-example's People

Contributors

first087 avatar

Watchers

James Cloos avatar Vattanan Buranapugdee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.