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

https://github.com/pedro-donoso/restapi-node-postgres

Rest API: Utilizo modulo pg, levanto servidor con Express y creo rutas, en Middlewares utilizo métodos para formato JSON y urlencoded, con Postgresql creo Base de Datos y agrego datos a Tabla
https://github.com/pedro-donoso/restapi-node-postgres

api api-rest express express-js expressjs json json-api node node-js nodejs nodemon npm pg postgres postgresql rest-api terminal

Last synced: 2 months ago
JSON representation

Rest API: Utilizo modulo pg, levanto servidor con Express y creo rutas, en Middlewares utilizo métodos para formato JSON y urlencoded, con Postgresql creo Base de Datos y agrego datos a Tabla

Awesome Lists containing this project

README

          

## Steps

### INIT

1. Download or Clone repo

### TERMINAL

2. In terminal:

```
npm i express pg nodemon
```

### RUN

3. In terminal:

```
npm run dev
```

### PSQL

4. Configuration in PSQL:

![vscode](https://user-images.githubusercontent.com/68760595/153223147-bf89fd18-0161-46eb-864d-087050e5d9ee.PNG)

### GET USERS

5. View users in localhost:

![local](https://user-images.githubusercontent.com/68760595/153224051-03483e7b-e46a-4dae-89f8-c9882d82a7d0.PNG)

### POST

6. In Extension VSCode "Thunder Client":

Method POST -> JSON

![thunder](https://user-images.githubusercontent.com/68760595/153226782-33827176-ff23-453c-8fd9-083a28036ff2.PNG)

### GET

7. Method GET -> Search Users by ID

![GET](https://user-images.githubusercontent.com/68760595/153227850-254086c2-e76b-4636-8a86-139120767633.PNG)

### DELETE

8. Method DELETE -> Delete Users by ID

![DELETE](https://user-images.githubusercontent.com/68760595/153228710-6fd9aaef-ae62-4491-a523-5163db8ccb65.PNG)

### UPDATE

9. Method PUT -> Update Users by ID

![update](https://user-images.githubusercontent.com/68760595/153231413-cf69656d-7733-4752-bf44-5da774d465b2.PNG)

* View changes -> Method GET

```
http://localhost:3000/users
```