Code Monkey home page Code Monkey logo

xservedbyfinder's Introduction

x-served-by finder

This repository accompanies a blog post, please read it before continuing.

Node.js vs. Bash โ€“ Apr First Raspberry PI Challenge

The challenge: Reveal all the web-server nodes hidden behind a load-balancer by checking for the X-Served-By header.

Open invitation

You will find a few solutions in Node.js, Bash and Go. This is an open invitation for your contribution. Solve the problem the way that feels most natural to you, in whatever programming language you like then:

  • Fork the repository
  • Push up your changes into a new folder with a brief README.md file
  • Ideally push a Dockerfile so that we can test the changes easily and include them in an automated build.
  • Raise a pull request (PR) and I will merge it.
  • Update the Examples so far section of the main README.md file.
  • Update the CONTRIBUTORS.md file with your Github username and fork.

This is a chance to contribute to an open-source project without having to over-commit your time or worry about pushing a flashy feature to an established code-base.

Related:

For a practical tutorial and progressive set of labs from an official Docker Captain try my Hands-on Docker Tutorial

Solutions so far:

List of Contributors

Tips for contributing

Use a fake server, instead of RaspberryPI.org

Update: You may find that running the code against RaspberryPI.org results in only two VMs being returned instead of the full set. I've also included a fake endpoint in the Github repo. You can test against this without going to the public Internet.

If you are using Docker then you can make use of a pre-built image directly from the Docker Hub xservedbyfinder-endpoint:

$ docker pull alexellis2/xservedbyfinder-endpoint
$ docker run -d -p 3000:3000 alexellis2/xservedbyfinder-endpoint

Without Docker:

  • Install Node.js (4.x) if you do not already have it.
  • Run the test server:
$ cd fakeendpoint/
$ node app.js
Listening on port 3000
  • Then update your URL to the IP address of your machine or http://localhost:3000
  • If you are using Docker then an environmental variable may be useful for passing different URLs.

You will now have a close simulation of the RaspberryPI.org website on the day as mentioned in the blog post.

Node.js vs. Bash โ€“ Apr First Raspberry PI Challenge

Extra points

  • Passing or configuring the URL by environmental variable.

  • Adding a Dockerfile

You can extra kudos for adding a Dockerfile. This means anyone who wants to run your example can do so with zero fuss. I'd also like to include them in a CI build at a later date.

Several Dockerfiles are already included, please look through the examples if you need an example.

xservedbyfinder's People

Contributors

alexellis avatar escapeindustries avatar sktb avatar chrisneave avatar

Stargazers

Taha Dhiaeddine Amdouni avatar Edward Marshall avatar Stefan Scherer avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

xservedbyfinder's Issues

Fewer processes.

probably waaaaay too late now, but it's never too late to learn something new, yes?!?

curl -s -I https://www.raspberrypi.org/#{1..100}

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.