CF LAB 01

01 Node Ecosystem

Author: Ryan Gallaway

Links and Resources

Build Status

Modules

arithmetic.js

greet.js

Arithmetic modules

Use the faker module to randomize input (airty of two) and add, subtract, multiply and divide input. value of 'null' returned if input is not a number or if dividing by 0.

Greet module

Use the faker module to randomize input (airty of one) and concatonate hello +input if input is a string. value of 'null' returned if input is not a string.

Setup

.env requirements

  • PORT - defined in ENV

Running the app

  • npm start
  • Endpoint: /

Tests

  • npm test (runs unit tests)
  • npm run lint (runs linter tests)
  • node -file-name- test
  • How do you run tests?
  • arithmetic must be done with integers, and cannot divide by 0
  • greet must be done with a string