Search This Blog

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




No comments:

Post a Comment