Skip to content

caioagiani/api-restify-mongoose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API-restify

TypeScript API using Restify with Mongoose

  • Install TypeScript global npm i -g typescript
  • Install dependencies: yarn install ou npm install
  • TypeScript compile: yarn compile ou npm run compile
  • Start application: yarn dev ou npm run dev.

Routes

  • Request findAll Users:
application.get("/users");

[
  {
    id: 1,
    name: "Caio Agiani",
    email: "caio.agiani14@gmail.com",
  },
  {
    id: 2,
    name: "Caio Henrique",
    email: "agianicaio@gmail.com",
  },
];
  • Request findById User:
application.get("/users/:id");

{
  "id": 1,
  "name": "Caio Agiani",
  "email": "caio.agiani14@gmail.com"
}
  • Request Create User:
application.post("/users");

{
  "name": "Caio Agiani",
  "email": "caio.agiani14@gmail.com",
  "password": "123"
}

Contato

Releases

No releases published

Packages

No packages published