Copyright 2018 Curve Dental
PayneDentistry is a single page application written in Angular and Node.js. It forms the basis of the code challenge use for Curve Dental software developers and software developers in test.
The easiest way to manage multiple versions of NodeJS is using nvm, the Node Version Manager. On Windows we recommend installing nvm using Chocolately. On MacOS use Homebrew. On Linux use the install script.
Your problem is detailed in the email which accompanied this repository.
Your solution must be on a separate git branch. Submit it as a single zip archive of the complete repository including the .git folder. Do not include the node_modules or server/node_modules folders with Node.js dependencies.
Your solution must lint without warnings or errors. All unit tests and end-to-end tests must pass without error.
There is nothing in the application which is meant to trick you. If you spot a bug then it is simply a bug and we'd be happy if you reported it or, better, fix it and send us a patch.
What if I don't know Angular, Express, or Bootstrap?
- The structure of the front-end application closely follows the Angular Fundamentals course from PluralSight.
- All three technologies are popular and there is a wealth of information on their websites, Stack Overflow, and other technology websites plus print media.
- You can find examples of all the pieces you need to construct the solution already within the sample application.
Run npm install -g @angular/cli@~6.1
to install the Angular CLI globally.
Run npm install
from the root directory to install both the Angular client application and the Node.js Express server.
Run npm start
for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
The backend server listens on port 3000. Any requests by the application to /api/ are proxied to the backend server using the proxying support in webpack dev server.
Run npm run build
to build the Angular project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
2018-07-28 Building the production source may take several minutes. The build will appear to hang at 92% running the UglifyJSPlugin. It will eventually complete. Fix is expected to webpack in a week or two. See FortAwesome/angular-fontawesome#34.
Run npm run serve-prod
for a production server. Navigate to http://localhost:3000/. Express will host the production build of the Angular application.
Tests are written using the Jasmine test framework.
You must run npm test
to execute the Angular unit tests via Karma and backend unit tests using Jasmine.
You must run npm run e2e
to execute the end-to-end tests via Protractor and backend integration tests using Jasmine.
Run npm run e2e-debug
. This will start the backend server on port 3000, compile and serve the front-end JavaScript on port 4200, and start Protractor with the Chrome debugger. Wait until the back-end and front-end server starts and
then connect the debugger to the web socket URI printed to the console. Suggested debuggers include Chrome Inspector(chrome://inspect) or VSCode Debugger for Chrome Extension.
You must run npm run lint
to lint both the client and server code. Angular code is linted using tslint for TypeScript. Express code is linted using eslint.