Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leotm/world-population-app
🌎 My successful solution to NCR's CLI task, followed by a phone interview. An app that you give a list of countries, then returns how many people live in each one, in order from highest to lowest.
https://github.com/leotm/world-population-app
api chai coding-exercise command-line mocha nodejs request
Last synced: about 2 months ago
JSON representation
🌎 My successful solution to NCR's CLI task, followed by a phone interview. An app that you give a list of countries, then returns how many people live in each one, in order from highest to lowest.
- Host: GitHub
- URL: https://github.com/leotm/world-population-app
- Owner: leotm
- Created: 2017-11-09T13:24:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-15T13:42:04.000Z (about 7 years ago)
- Last Synced: 2024-10-11T10:21:44.599Z (3 months ago)
- Topics: api, chai, coding-exercise, command-line, mocha, nodejs, request
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# World Population Node.js command-line app
Returns a sorted list of given countries.
Ordered from highest to lowest population size.
Queries the World Population API.## Build
Run `npm install` to build the project.
## Test
Run `npm test` or `mocha test`.
All 3 tests should pass with flying colours.## Run
Run e.g. `node app.js "Greece, Brazil, France, Germany"` from your command line.
## Example command-line output
```
Brazil: 211785533
Germany: 80612060
France: 65026385
Greece: 10885390
```## Debug
Launch the program in the Visual Studio Code built-in debugger.
The `.vscode/launch.json` configuration file will pass the example command-line argument `"Greece, Brazil, France, Germany"`.
The Debug Console tab will display the output.