Coder Social home page Coder Social logo

pedro-donoso / node-postgres-intro Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.6 MB

Conexión Nodejs y Postgresql, Se pueden consultar libros desde una base de datos SQL, Insertar, Eliminar y Editar Usuarios desde la terminal, los cambios se ven reflejados en la tabla y base de datos creada en Postgresql desde PSQL

JavaScript 100.00%
psql psql-database postgresql postgres postgresql-database pg nodemon express expressjs express-js

node-postgres-intro's Introduction

Conection Nodejs with Postgresql

  • Necesary

Download or Clone repositorie, in terminal:

npm i express pg nodemon

PSQL

  1. init PSQL with password: password

psql

GET BOOKS

  1. In folder src/index.js, activate function getBooks();

getbooks

TERMINAL

  1. In terminal:

npm run dev

respuesta

INSERT USER

  1. In folder src/index.js, comment function -> //getBooks();

insert

TERMINAL

  1. In terminal:

npm run dev

insertado

PSQL

  1. In PSQL, connect to library: \c library

library

  1. List of Tables:

\dt

lista

LIBRARY

  1. library=# select * from users;

nuevo

DELETE USER

  1. Delete user, comment -> //instertUser();

borrar

TERMINAL

  1. In terminal:

npm run dev

nodemon

PSQL

  1. in PSQL, select * from users;

eliminado

EDIT USER

  1. editUser(), comment -> //deleteUser();

edicion

TERMINAL

  1. In terminal:

npm run dev

editado

PSQL

  1. in PSQL, select * from users;

final

node-postgres-intro's People

Contributors

pedro-donoso avatar pedrodonoso473 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.