Code Monkey home page Code Monkey logo

database_server_kata's Introduction

Database Server Tech Test

#Task You receive a message from a prospective employer:

"Before your interview, write a program that runs a server that is accessible on http://localhost:4000/. When your server receives a request on http://localhost:4000/set?somekey=somevalue it should store the passed key and value in memory. When it receives a request on http://localhost:4000/get?key=somekey it should return the value stored at somekey.

#Outline Techs used: Sinatra app, Ruby, Rspec

TDD approach taken writing a failing test then looking to write the code to pass that test. Started initilly with running a server at localhost:4000 then looked to save and finally return data

#How to use

  • Clone this repo and change into the directory created
  • Run bundle install in your command line
  • Run ruby 'app.rb' in your command line
  • In a browser of your choice go to http://localhost:4000

#Using the app To save to the database

To retrieve info back from the database

  • Visit http://localhost:4000
  • On the lower form type in the key you want to know the value for
  • Click 'Find value'
  • You will see a message displaying what the value of the key is
  • Press 'Back' on your brower to return to http://localhost:4000 and enter in further key/values or search more keys.

database_server_kata's People

Contributors

peel3r avatar

Watchers

 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.