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: "[email protected]",
  },
  {
    id: 2,
    name: "Caio Henrique",
    email: "[email protected]",
  },
];
  • Request findById User:
application.get("/users/:id");

{
  "id": 1,
  "name": "Caio Agiani",
  "email": "[email protected]"
}
  • Request Create User:
application.post("/users");

{
  "name": "Caio Agiani",
  "email": "[email protected]",
  "password": "123"
}

Contato

Releases

No releases published

Packages

No packages published