This project was generated with Angular CLI version 1.0.3.
Find the file 'COSMOS-Accelerators-Facial-Recognition / src / app / services / cognitive-api.service.ts ' and add your own COSMOS API keys.
Before you get started with this project, make sure your environment is good to go.
- Install Node.js
- Install Visual Studio Code
- Install the Angular CLI
- Install git
NOTE: On Windows 10--with npm
or git
you may have to update your Environment Variables for the command line to know where they were installed.
Now that you have your environment set up, you can finally start working with the sample code.
git clone https://github.com/cosmos-cognitive-cloud/COSMOS-Accelerators-Facial-Recognition
- Right click the project directory -> select
Open with Code
- Ctrl + Shift + ` to open a terminal window
- Type
npm install
to download the project's packages - Type
ng serve
to run the application viahttp://localhost:4200/
. The app will automatically reload if you change any of the source files. - Success! You should see a working demo of the People Face Identification and Recognition Algorithm built on Angular.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app 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|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.