Project structure

Project Setup
- Create directory and cd to the directory
mkdir my_module
cd my_module
- Initialize and install third-party module
- Update the
package.json
file
{
"name": "ameh-calculator",
"version": "1.0.0",
"main": "app.js",
"type": "module",
"scripts": {
"dev": "node app.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"chalk": "^5.4.1"
}
}
- Create the calculator.js file in the custom module to implement basic arithmetic calculation and export

- Create app.js file in the root directory to import the functions

- Run the app based on the scripts added in
package.json
file

- Initialize git, add and commit the project to GitHub
git init
git add .
git commit -m "message"
git remote add origin https://github.com/ameh0429/techcrush assignment.git
git branch -M main
git push -u origin main