Search This Blog

Tuesday 26 December 2023

Java stuff

 Following this tutorial:

https://www.youtube.com/watch?v=8SGI_XS5OPw&t=433s


You have to go to this github link:

https://github.com/amigoscode/spring-data-jpa-course

Login to your account so you can see all the necessary options. 

Go to  Code/Local/SSH and copy the url

you need to generate the ssh keys. The first step is to install git. In this case for windows. Go to this page for reference. 

https://github.com/git-guides/install-git

After this installation, we should generate an ssh key, follow this link for reference:

https://docs.github.com/es/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent


Now go to IntelliJ -> New -> Project form version control

Paste the URL https://github.com/amigoscode/spring-data-jpa-course and then clone. 

For the next step look for the SQL shell using the windows bottom. 

You can create the data base amigoscode using the SQL shell or you can directly create the database using pgAdmin, that worked for me. 


I follow this tutorial to connect successfully the postgres database with the spring boot project

https://www.youtube.com/watch?v=ZTxn38j4DJE

Sunday 10 December 2023

Software Engineering Stuff

 Angular Notes:


I'm following the next tutorial 

https://www.youtube.com/watch?v=NMzl2pGOK_8&list=PL1BztTYDF-QNrtkvjkT6Wjc8es7QB4Gty

and I just write the commands that I think are very important to remember.

Install Angular CLI global:

npm install -global @angular/cli@latest

create a new project call app1

ng new app1

go inside the folder app1

Run Angular project:

ng serve -o

do:

 ng generate component header

Display app in Local host:

Write in your browser:

 http://localhost:4200/

To solve the error:

ng.ps1 cannot be loaded. You cannot run this script on the current 

system

Go to this website to correct it: 

https://caiomsouza.medium.com/fix-for-powershell-script-not-digitally-signed-69f0ed518715

Create a new angular project

 If your project does not load app.mode.ts file, run 

ng new my-app --no-standalone --routing --ssr=false

there is a post about it here:

https://github.com/angular/angular/issues/52751


Docker


Trying to run a docker-compose.yml, I found that the document presented in the tutorial:

https://app.amigoscode.com/courses/267273/lectures/44198924

Should be:

services:
db:
container_name: postgres
image: postgres
environment:
POSTGRES_USER: amigoscode
POSTGRES_PASSWORD: PASSWORD
PGDATA: /data/postgres
volumes:
- db:/data/postgres
ports:
- "5332:5432"
networks:
- db
restart: unless-stopped

networks:
db:
driver: bridge

volumes:
db:


I ran docker and it worked well. 

We run with the command docker-compose up -d