Skip to content

first087/RESTful-API-Example

Repository files navigation

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 14.x / Express 4.x
2. Node.js / Hapi Visual Studio Code first087 Done Node.js 14.x / Hapi 20.x
3. Java / Spring Boot IntelliJ IDEA first087 Done JDK or OpenJDK 11+ / Gradle 7.1.1 / Spring Boot 2.5.3
4. Kotlin / Spring Boot IntelliJ IDEA first087 Done JDK or OpenJDK 11+ / Gradle 7.1.1 / Spring Boot 2.5.3
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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published