A JavaScript functional programming challenge featuring too much pointless brevity.
Q: Can a basic Node.js web application framework be composed from multiple single-line functions, each with a length of 100 characters or fewer?
A: Yeah, more-or-less.
- Each function may only be a single line long
- Each function definition must not exceed 100 characters in length
- Length limit does not include assignment (
module.exports =
, etc.) - Length limit does include formal parameters (
(x, y, z) => {}
)
- Length limit does not include assignment (
- Functions must be short, but readable: include spaces
- Prefer pure functions where possible
- Semicolons are prohibited
- Comments are required to help understand what each function does
- Unit tests and 100% code coverage are required
- All code must run in strict mode
git clone https://github.com/ConnorWiseman/one.git
cd one
npm i
npm start
Pop open a browser and hit http://localhost:3000
, then watch your console.
- Implement some form of URL request routing