your-angular-app
your-angular-app.
This is your project root directory.
cd your-angular-app
ng serve
http://localhost:4200 Ctrl+c
your-angular-app
your-angular-app.
This is your project root directory.
cd your-angular-app
ng build
dist folder in your project root directory.
The dist folder contains a your-angular-app folder;
the your-angular-app folder should basically contain the following files
3rdpartylicenses.txt favicon.ico index.html main.9e187e65c1681375.js polyfills.c96eac4dbe535b22.js runtime.c60b955f0b7642f8.js styles.ef46db3751d8e999.css
app.yamlruntime: nodejs16 instance_class: F2 env_variables: BUCKET_NAME: "your-ng-app-bucket" handlers: - url: / static_files: dist/your-angular-app/index.html upload: dist/your-angular-app/index.html - url: / static_dir: dist/your-angular-app
angular-app-gcp) and
a bucket (named ng-app-bucket).
ng-app-bucket)
app.yaml file
and the Upload folder option to upload your dist folder.
Note: You may create a folder for your Angular application, and then upload
your app.yaml file and dist folder to it.
You will later include this newly created folder's name when running
gsutil to sync the data.
angular-app-gcp)
using the command
mkdir angular-app-gcp
gsutil rsync -r gs://ng-app-bucket ./angular-app-gcp
Note: If you put
your app.yaml file and dist folder in
a folder (previously created in your bucket),
include the folder's name.
For example, if your folder's name is ng-example,
the command would be
gsutil rsync -r gs://ng-app-bucket/ng-example ./angular-app-gcp
angular-app-gcp folder, using the command
cd angular-app-gcp
gcloud app deploy
14 (for us-east4) for the region where you want your
App Engine application located
y to continue
gcloud app browse
https://angular-app-gcp-243113.uk.r.appspot.com
Released under the
CC-BY-NC-SA 4.0 license.