This project uses Angular CLI with Cornerstone3D for DICOM viewing. It can run at the site root or under a subpath (e.g. /subpath/).
- Dev:
npm startornpm run dev→ open http://localhost:4200/ - Build:
npm run build→ output indist/angular-vite-6/ - Preview:
npm run preview→ builds then serves at http://localhost:4201/ (use this if dev server doesn’t load images)
- Dev:
npm run dev:subpath→ open http://localhost:4200/subpath/ - Build:
npm run build:subpath→ output indist/angular-vite-6/(asset URLs use/subpath/) - Preview:
npm run preview:subpath→ builds for subpath then serves at http://localhost:4202/
For production, deploy the build from build:subpath to a server that serves the app under /subpath/.
To start a local development server (main path), run:
ng serveOnce the server is running, open your browser and navigate to http://localhost:4200/. The application will automatically reload whenever you modify any of the source files.
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
ng generate component component-nameFor a complete list of available schematics (such as components, directives, or pipes), run:
ng generate --helpTo build the project (main path):
ng buildTo build for deployment under a subpath:
npm run build:subpathBuild artifacts are in dist/angular-vite-6/. The production build optimizes your application for performance and speed.
To build and serve the production output locally (useful when the dev server doesn’t load images or to test the real bundle):
npm run previewThen open http://localhost:4201/. For a subpath build:
npm run preview:subpathThen open http://localhost:4202/. The first run may prompt to install the serve package if needed.
To execute unit tests with the Karma test runner, use the following command:
ng testFor end-to-end (e2e) testing, run:
ng e2eAngular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
For more information on using the Angular CLI, including detailed command references, visit the Angular CLI Overview and Command Reference page.