To install dependencies, run npm install in the root directory, then run npm install in the server directory as well.
The pa11y HTMLCS test runner has been patched (using patch-package) to use the HTMLCS.js located in src/assets/HTMLCS.js instead.
- See
drupal-server/(1) for the Node.js-based Drupal server files. - See
server/(2) for the Node.js-based Accessibility Check WebSocket server files. - See
src/(3) for the Angular-based front-end.
The WebSocket server at server/ can be consumed either from the Angular front-end at src/ or from the Drupal server at drupal-server/, depending on your use case (so either 1+2, or 2+3).
- Express.js for the back-end servers.
- WebSockets for real-time communication.
- Angular as a front-end framework.
- Angular Material for Material Design components.
- Pa11y (which uses HTML_CodeSniffer and PhantomJS) for the accessibility sniffs.
- Node-simplecrawler for crawling.
- Navigate to the server directory and run
node bin/wwwto start the back-end server. - Run
ng servefor a dev server. Navigate tohttp://localhost:4200/. The app will automatically reload if you change any of the source files.
Run npm run build-prod to build the project. The build artifacts will be stored in the dist/ directory.
Run npm run build-readonlyprod to build a read-only build (without the crawler).
- Make sure the back-end server is running prior to running the tests (see instructions under "Development server")
- Run
ng testto execute the unit tests via Karma. - Run
npm testinserver/to execute the server unit tests.
Run ng e2e --serve=false to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve.
- Update
src/app/config.tsto contain the URL of the backend server. - Run
ng serve --public HOSTNAME --host PUBLICIPto serve up the front-end. - Navigate to the server directory and run
node bin/wwwto start the back-end server.