Giter VIP home page Giter VIP logo

sample_script's Introduction

Sample Script

Part 1: Plain/Raw Node JS Callbacks

Part 2: Flow Libraries

Part 3: Promises

Part 4 (Bonus): Streams

Instructions on How to Run This Node.js Project

  1. Install Node.js: Ensure you have Node.js installed on your machine. You can download it from nodejs.org.

  2. 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
  3. Navigate to the Solution Directory: Change to the solution directory where the scripts are located:

    cd solution
  4. Install Dependencies: Dependencies can be installed using npm:

    npm install
  5. 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
  6. 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).

  7. 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```

sample_script's People

Contributors

iameijaz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.