Skip to content

codeestX/my-restful-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

基于node.js + koa2搭建的restfulapi demo,扩展自learn-javascript,基本涵盖了主要的api类型,联动文章:编写 部署

#Usage 项目目录下执行,node start

  • GET (json)
    http://localhost:3000/api/geeknews/version http://localhost:3000/api/products

  • GET (image)
    http://localhost:3000/img/test.jpg

  • GET (file)
    http://localhost:3000/apk/geeknews.apk

  • POST (json)
    http://localhost:3000/api/products
    body {"name":"XBox","price":3999}

  • DELETE (json)
    http://localhost:3000/api/products/p1

About

My RESTful API based on node.js & koa2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published