https://github.com/pedro-donoso/node-postgresql
API REST con Nodejs y base de datos Postgresql, el usuario puede crear nuevos proyectos con POST, consultar existentes con GET o especificos por ID, actualizar con PUT y eliminar con DELETE
https://github.com/pedro-donoso/node-postgresql
api api-rest crud express express-js expressjs morgan node node-js nodejs nodemon pg pg-hstore postgres postgresql
Last synced: 3 months ago
JSON representation
API REST con Nodejs y base de datos Postgresql, el usuario puede crear nuevos proyectos con POST, consultar existentes con GET o especificos por ID, actualizar con PUT y eliminar con DELETE
- Host: GitHub
- URL: https://github.com/pedro-donoso/node-postgresql
- Owner: pedro-donoso
- Created: 2022-02-17T14:19:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-05T23:03:33.000Z (over 1 year ago)
- Last Synced: 2025-01-25T20:42:06.235Z (over 1 year ago)
- Topics: api, api-rest, crud, express, express-js, expressjs, morgan, node, node-js, nodejs, nodemon, pg, pg-hstore, postgres, postgresql
- Language: JavaScript
- Homepage:
- Size: 1.54 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### Steps:
1. Download code
2. In terminal:
```
npm install express pg pg-hstore nodemon sequelize morgan @babel/polyfill
```
3. Babel:
```
npm install --save-dev @babel/core @babel/cli @babel/preset-env
```
4. in PSQL -> password: password

5. In terminal, run server:
```
npm run dev
```
6. ### POST
In extension "Thunder Client", vsCode:
```
http://localhost:3000/api/projects
```

7. ### GET (All Projects)
In PSQL -> SELECT * FROM projects;

8. ### GET (Project by ID)
In extension "Thunder Client":
```
http://localhost:3000/api/projects/12
```

9. ### PUT
Update project
```
http://localhost:3000/api/projects/2
```

10. ### DELETE

Delete project
```
http://localhost:3000/api/projects/14
```
* revision in PSQL -> SELECT * FROM projects;
