Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/caioagiani/api-restify-mongoose

TypeScript API using restify and Mongoose
https://github.com/caioagiani/api-restify-mongoose

api api-restful mongodb mongoose nodejs restify typescript

Last synced: 2 months ago
JSON representation

TypeScript API using restify and Mongoose

Awesome Lists containing this project

README

        

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

- [x] Request findAll Users:

```javascript
application.get("/users");

[
{
id: 1,
name: "Caio Agiani",
email: "[email protected]",
},
{
id: 2,
name: "Caio Henrique",
email: "[email protected]",
},
];
```

- [x] Request findById User:

```javascript
application.get("/users/:id");

{
"id": 1,
"name": "Caio Agiani",
"email": "[email protected]"
}
```

- [x] Request Create User:

```javascript
application.post("/users");

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

## Contato

- [LinkedIn](https://www.linkedin.com/in/caioagiani/)
- [email protected]