Giter Site home page Giter Site logo

headout_intern_assignment's Introduction

Headout - Software Engineer, Intern - Assignment

Screenshots

  • Chrome local host :-
image-1
  • Docker terminal :-
image-2
  • Docker container :-
image-3

Installation

  1. Clone the repository to your local machine.

    git clone https://github.com/aniket-24/Headout_Intern_Assignment.git
  2. Install the required packages.

    cd Headout_Intern_Assignment
    npm install
  3. Start the development server.

    node server.js
  4. Open the project in your browser at http://localhost:8080 to view your project.

Coding Question: Optimize HTTP Server

Problem Statement:

You are tasked with implementing a simple HTTP server with the following requirements.

Implementation requirements

  • Set up an HTTP server in a language/framework of your choice.
  • The server should respond to incoming GET requests on the endpoint /data.
  • You must accept 2 query params, n: file name, and m: line number.
  • If n and line both are provided, return the content of file /tmp/data/n.txt at line number m.
  • If only n is provided, return the contents of file /tmp/data/n.txt entirely.
  • Each file should be around 100MB in size, there will be more than 30 different files (eg; 1.txt, 2.txt ... 30.txt โ€ฆ n.txt).

Sample input and output:

  • Request: /data?n=1&m=30
  • Response: vyAF9kLDTIbqkv5R7hFqGDXaxezu3WMV5pcPd6RdudWMqMGJBQ9YLOoCQt

headout_intern_assignment's People

Contributors

aniket-24 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.