Coder Social home page Coder Social logo

codingtask's Introduction

Coding Task

This a backend development task where the you use your geolocation to save a certain message.

This Task consists of three parts

First the message insertion with a certain location the api for this 'api/messages/newmessage' To retrive these message the required api is 'api/messages/searchformessage/:longitude/:latitude'

Second the messages within a raduis of 100 km retrieval the required api is 'api/messages/inrange/:longitude/:latitude'

Finaly to get the closest node to a certain location, the required api is 'api/messages/closestnode/:longitude/:latitude'

You will need

A Laptop with a bash shell (Unix bases OS with ubuntu terminal) A modern browser e.g. latest google chrome Internet, NodeJS, Git, MongoDB, Text Editor such as Atom

Installation

To install MongDB run in the ubuntu terminal 'sudo apt-get install mongodb'

To install Nodejs run in the ubuntu terminal 'sudo apt-get install nodejs'

To install npm(Node package manager) run in the ubuntu terminal 'sudo apt-get install npm'

To install all the Prerequisites run in the folder project 'sudo npm install'

Booting the server

To boot the server in the run the folder project 'npm start'.

Tests

The tests are done using Mocha and chai for assertion and geolib to make sure the returned results from the database are correct.

Run Tests To start the tests run the folder project 'npm test' after starting the server.

codingtask's People

Contributors

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