node.js, JS, CLI, third-party API
In this project, we developed a CLI program using node.js which runs in a terminal application. The program connects to a third-party API to display the returned data, and is able to store it in and to load it from the local system.
The repository contains the files and folders detailed below:
-
commands: folder in which we stored the different commands the CLI implements in separate files, including:
get-movie,get-movies,get-personandget-persons. -
postman: a folder that includes a postman collection in .json format with all the endpoints used in the pill to connect to a third-party API.
-
utils: utilities folder where to store auxiliary .js files used either by the main application or the commands, including:
- local.js: which contains a function to load data from a local folder.
- prints.js: which contains different functions to display the required data on the command line.
- save.js: with a function to store the data required via https request in a local folder.
-
.env-template: a file with the individual user environment variables needed to run this application. Basically only an API key is needed, which can be obtained for free by registering in TMDb.
-
.gitignore: used to indicate the files and folders to be ignored by the version control system Git.
-
README.md: this file.
-
moviedb.js: main entry point to the program, with calls (via
require) to the npm package commander to generate our command line interface application and to the different implemented commands. -
package-lock.json: automatically generated file used for any operations where the package manager npm modifies either the node_modules tree (not included in this repository) or the file package.json.
-
package.json: contains information about the project (name, version, etc.) including the packages installed as dependencies.
- Berón Gamboa Gavilanes → beron-gamboa
- Jorge García Torralba → jorge-garcia