Skip to content

Commit

Permalink
Fix angular paths and package json scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
0GiS0 committed Sep 10, 2023
1 parent a03be81 commit 8fd95c9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ RUN npm run build --prod

FROM nginx:stable

EXPOSE 80

COPY nginx.conf /etc/nginx/conf.d/default.conf

COPY --from=build-step /app/dist/angular-tour-of-heroes /usr/share/nginx/html

# ########### Openshift #################
Expand Down
43 changes: 43 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
server {
listen 80;
server_name localhost;

#access_log /var/log/nginx/host.access.log main;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "angular-tour-of-heroes",
"version": "1.0.0",
"scripts": {
"ng": "export NODE_OPTIONS=--openssl-legacy-provider ng",
"start": "export NODE_OPTIONS=--openssl-legacy-provider && ng serve",
"build": "export NODE_OPTIONS=--openssl-legacy-provider && ng build",
"watch": "export NODE_OPTIONS=--openssl-legacy-provider && ng build --watch --configuration development",
"test": "export NODE_OPTIONS=--openssl-legacy-provider && ng test",
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"prettier-check": "prettier --check \"./**/*.{md,jsx,json,html,css,js,yml,ts,tsx}\"",
"prettier-format": "prettier --write \"./**/*.{md,jsx,json,html,css,js,yml,ts,tsx}\""
},
Expand Down Expand Up @@ -41,4 +41,4 @@
"prettier-check": "^2.0.0",
"typescript": "~4.6.4"
}
}
}

0 comments on commit 8fd95c9

Please sign in to comment.