- part2_async.js - Async
- part2_step.js - Step
- bonus_stream.js - Stream
-
Install Node.js: Ensure you have Node.js installed on your machine. You can download it from nodejs.org.
-
Clone the Repository: Clone this repository to your local machine using the following command:
git clone https://github.com/iameijaz/sample_script.git cd sample_script
-
Navigate to the Solution Directory: Change to the
solution
directory where the scripts are located:cd solution
-
Install Dependencies: Dependencies can be installed using npm:
npm install
-
Run the Scripts: Each script can be run using Node.js. For example, to run
part1_raw.js
:node part1_raw.js
Similarly, you can run the other scripts by replacing
part1_raw.js
with the desired script name:node part2_async.js node part2_step.js node part3_promise.js node bonus_rxjs.js node bonus_stream.js
-
Testing the Server: If the scripts are server scripts, you can test them by navigating to
http://localhost:3000/I/want/title/?address=google.com
in your web browser (assuming the server is set to listen on port 3000). -
Stopping the Server: To stop a running server, you can use
Ctrl + C
in the terminal where the server is running.
Following is an example URL for testing:
http://localhost:3000/I/want/title/?address=google.com&address=www.bing.com&address=www.yahoo.com.pk&address=en.wikipedia.org/wiki/Main
sample_script/
├── README.md
└── solution/
├── part1_raw.js
├── part2_async.js
├── part2_step.js
├── part3_promise.js
├── bonus_rxjs.js
└── bonus_stream.js```