8000 GitHub - johnnsantana/mvc-sample: a sample mvc app for learning
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

johnnsantana/mvc-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVC-SAMPLE Application

  • a fake application for learning pattern MVC, this application use array how db and apply only test in repository

REST API

The REST API routes

GET ALL VALUES

Request

GET /api/v1/values

Response

{ [ 'value', 'value', 'value', 'value', 'value' ] }

Request

GET /api/v1/value/{id}

  • id is index of value array ex: /api/v1/value/0

Response

{ "value": "value1" }

Request

POST /api/v1/value

  • value for value for add in array

Response

{"message": "create sucessfuly"}

Request

PUT /api/v1/value/{id}

  • id for value for update in index of array

Response

{ "message": "update sucessfuly!" }

Request

DELETE /api/v1/value/{id}

  • id is index in array for value is delete

Response

{ "message": "204 No Content" }



RUN TEST

  • npm run test



ENV File

  • in env.sample is a example for your create env file in your root

About

a sample mvc app for learning

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published
0