Postgres

[[dev-notes]]

1
sudo apt install postgresql
1
2
3
4
5
6
#log into psql cli
sudo -u postgres psql

#psql commands
\dt shows tables
\q quit
1
2
3
4
5
6

postgres=# ALTER USER postgres PASSWORD 'mynewpassword';

CREATE TABLE monies (entry_id serial PRIMARY KEY,date date,  amount FLOAT, description VARCHAR(255));

INSERT INTO monies (date, amount, description) VALUES('11/12/2024', 444.44, 'tanners bday');
1
2
3
4
5
6
7
     pool = new Pool({
        host: 'localhost',
        database: 'postgres',
        user:'postgres',
        password:'mynewpassword',
        port: 5432
    });