This project was generated with Angular CLI version 15.1.3.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
Run Cloud Build Job
- The file
deployment/cd/dev.yamlcontains a Cloud Build Manifest that will build and push your agent frontend container and deploy it to Cloud Run. There are a couple of substitution variables to be set when using this file.
| Variable | Description | Required |
|---|---|---|
| _CONTAINER_NAME | The name of the backend container. Defaults to "chatbot_ui" | No |
| _PROJECT_ID | Google Cloud Project ID for resource deployment. | Yes |
| _ARTIFACT_REGISTRY_REPO_NAME | Artifact registry for containers. | Yes |
| _SERVICE_NAME | The name of the backend Cloud Run service. Defaults to "chatbot-ui-service" | No |
| _REGION | The region to use for the container and Cloud Run service. Defaults to "us-central1" | No |
-
Example run:
gcloud builds submit --config deployment/cd/dev.yaml --substitutions _CONTAINER_NAME=chatbot_ui,_PROJECT_ID=next-2024-industry-demos,_ARTIFACT_REGISTRY_REPO_NAME=my_artifact_registry,_SERVICE_NAME=chatbot-ui-service,_REGION=us-central1 . -
The file
src/environments/environment.tscontains information related to your backend runtime deployment. Update this file with your deployment details:
const env: string = 'dev';
let backendURL: string;
let chatbotName: string;
switch (env) {
case 'prod':
backendURL = "https://your-production-backend.com/"; // Replace with your production URL
chatbotName = "your-production-chatbot-name"; // Replace with your production chatbot name
break;
case 'stage':
backendURL = "https://your-staging-backend.com/"; // Replace with your staging URL
chatbotName = "your-staging-chatbot-name"; // Replace with your staging chatbot name
break;
case 'dev':
default:
backendURL = "http://localhost:8000/";
chatbotName = "agentsmithy-starter-agent";
break;
}
export const environment = {
production: env === 'prod',
backendURL: backendURL,
chatbotName: chatbotName,
environmentName: env,
};To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
