Giter Club home page Giter Club logo

web_server's Introduction

Web Server

This is a simple web server in which you can specify a URL web link and it will return a Twitter profile if found on the webpage. Please note that this server only looks at the current page of the link provided and not the entire domain e.g. http://ashwinkachhara.com/contact-3/ will return a Twitter profile link however http://ashwinkachhara.com/ will not.

This server uses Sinatra which is a simple web server gem for Ruby. It also uses the Nokogiri gem which can parse HTML and search through it using (in this project's case) CSS selectors.

Dependencies / Requirements

  • Bundler 1.13.6 (latest)
  • Ruby 2.3.0

How to use?

  1. Clone this repository to your local machine (I usually do this to desktop for easier navigation)

  2. CD into the cloned repository and run:

    bundle install

    This so that you have all the gems / dependencies installed on your particular project.

  3. Then run the following command to get the app running:

    ruby app.rb

  4. Go to your browser and type the below onto your URL search bar:

    http://localhost:4567/getlinks

  5. You should see the following on your browser:

    Web server screenshot

  6. Type in a URL of your choice into the form and hit submit.

  7. If a Twitter profile is found, this will show up under Results heading.

  8. To exit the web server, type CTRL + C on your command line.

web_server's People

Contributors

pinglinh avatar

Stargazers

GAURAV avatar

Watchers

James Cloos avatar  avatar  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.