All Projects → divyanshu-rawat → haversine-rest-api

divyanshu-rawat / haversine-rest-api

Licence: other
This Api compares results returned by ‘Haversine’ formula and MongoDB Geospatial Indexes.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to haversine-rest-api

Ecommerce
Angular 6 Ecommerce Application POC
Stars: ✭ 46 (+187.5%)
Mutual labels:  mongoose, mlab
Express Starter
🚚 A boilerplate for Node.js, Express, Mongoose, Heroku, Atlas, Nodemon, PM2, and Babel. REST / GraphQL API Server | PaaS | SaaS | CI/CD | Jest | Supertest | Docker | MongoDB | PostgreSQL | Sequelize | Lodash | RxJS | JWT | Passport | WebSocket | Redis | CircleCI | Apollo | DevSecOps | Microservices | Backend Starter Kit | ES6
Stars: ✭ 353 (+2106.25%)
Mutual labels:  mongoose, nodemon
Registration-and-Login-using-MERN-stack
Simple Registration and Login component with MERN stack
Stars: ✭ 210 (+1212.5%)
Mutual labels:  mongoose, nodemon
Bookmarks.dev
Bookmarks and Code Snippets Manager for Developers & Co
Stars: ✭ 218 (+1262.5%)
Mutual labels:  mongoose, nodemon
express-mongoose-es8-rest-api
A Boilerplate for developing Rest api's in Node.js using express with support for ES6,ES7,ES8 ,Mongoose,JWT for authentication,Standardjs for linting
Stars: ✭ 20 (+25%)
Mutual labels:  mongoose, nodemon
generator-espress
an opinionated yeoman generator that scaffolds a mvc express webapp completely in es6
Stars: ✭ 20 (+25%)
Mutual labels:  mongoose
ahobsu-node-backend
🌈 MOTI ! Make Own True Identity ⭐️ 유니큐와 유초코파이 노드로 탈주하다😎
Stars: ✭ 16 (+0%)
Mutual labels:  nodemon
mongoose-schema-jsonschema
Mongoose extension that allows to build json schema for mongoose models, schemes and queries
Stars: ✭ 88 (+450%)
Mutual labels:  mongoose
value-app
Calculate the per-use value of purchases over time.
Stars: ✭ 14 (-12.5%)
Mutual labels:  mongoose
react-full-stack-starter
🎈Full-stack React boilerplate using `create-react-app`, Babel, Node.js, and express
Stars: ✭ 22 (+37.5%)
Mutual labels:  mongoose
task-manager
Open-source task manager based on Kanban. Made with vue.js, koa2, mongodb\mongoose.
Stars: ✭ 23 (+43.75%)
Mutual labels:  mongoose
express-mysql-rest
Building the simple api with sequelize, mysql and express js. this repository contains the code about how to use sequelize with mysql at express js. for example i have provide the crud operation to this repository. You can also testing the api with chai and mocha with chai-http by this repository
Stars: ✭ 25 (+56.25%)
Mutual labels:  nodemon
The-Ultimate-Guide-to-TypeScript-With-Mongoose
youtu.be/tbt7eo1fxui
Stars: ✭ 14 (-12.5%)
Mutual labels:  mongoose
task-manager
Task Manager App
Stars: ✭ 19 (+18.75%)
Mutual labels:  mongoose
express-mvc
A light-weight mvc pattern for express framework with minimum dependencies
Stars: ✭ 23 (+43.75%)
Mutual labels:  mongoose
inventory-demo
a simple MERN stack CRUD app example
Stars: ✭ 15 (-6.25%)
Mutual labels:  mongoose
Python-notes
Python related technologies used in work: crawler, data analysis, timing tasks, RPC, page parsing, decorator, built-in functions, Python objects, multi-threading, multi-process, asynchronous, redis, mongodb, mysql, openstack, etc.
Stars: ✭ 104 (+550%)
Mutual labels:  mlab
docker-node-mongo-react-STARTER
🐋 🍃 ⚛️ Boilerplate for Node.js, MongoDB, React Applications (with Docker)
Stars: ✭ 34 (+112.5%)
Mutual labels:  mongoose
mean-stack
MEAN stack Mongoose, Express, Angular6, Node
Stars: ✭ 22 (+37.5%)
Mutual labels:  mongoose
mongoose-field-encryption
A simple symmetric encryption plugin for individual fields. Dependency free, only mongoose peer dependency.
Stars: ✭ 47 (+193.75%)
Mutual labels:  mongoose

Built a rest Api in Node.js by leveraging Node.js

Greenkeeper badge

forthebadge forthebadge forthebadge

Contact me on Codementor Twitter URL

Say Thanks! Build Status

Back-End API

  • https://myrestfulapplication.herokuapp.com/api/users
  • Please Use POSTMAN for Testing Purpose !!
  • Authenticate Client First
  • Username : divyanshu
  • Password : xyz
  • A JWT will be generated and used for subsequent request from Client to server !
  • You can register as well no need to rely on username : divyanshu !!

Description

  • This Api compares results returned by ‘Haversine’ formula and MongoDB Geospatial Indexes and Queries feature.
  • when a location is given and we need to fetch all the nearby points within a radius.
  • Used JSON web tokens for token-based user authentication.
  • Used ‘Haversine’ formula to calculate distance between given (Latitude,longitude) pairs.
  • This Api compares results returned by ‘Haversine’ formula and MongoDB Geospatial Indexes and Queries feature.

How it works !

Api Consist of following End Points


  	app.post('/post_location',callback.post_location);

	app.get('/get_location',callback.get_location);

	app.get('/',callback.basic_route);

	app.post('/register',callback.register_user);

	app.get('/users',callback.get_users);

	app.post('/get_using_self',callback.get_using_self);
	
	app.post('/get_using_self',callback.get_using_mongodb

Installation Instructions

  • Clone or download the repo. into any fresh temporary folder.

  • Cd into that root folder you just cloned locally.

  • Open terminal in the current folder and to install all dependencies type

   npm install 
  • Now typing
   nodemon server.js
  • will start a server !

DB Used (MongoDB)

  • MLab's MongoDB hosting platform is the fastest growing cloud Database-as-a-Service in the world. Get started with a free database and expert support.

Package Manager Used (NPM)

  • NPM is the default package manager for the JavaScript runtime environment Node.js.

Package.json (dependencies)

  • For dependencies refer Package.json.

For Testing (Postman)

  • Postman extension can be used for testing !
  • Supercharge your API workflow with Postman! Build, test, and document your APIs faster.
  • You can now fire up postman and then perform several operations on the REST API.

Contributing

  1. Create your branch: git checkout -b my-new-feature

  2. Commit your changes: git commit -m 'Add some feature'

  3. Push to the branch: git push origin my-new-feature

  4. Send a Pull Request

  5. Enjoy!

Examples

alt tag

alt tag

Comparison between Haversine Formula v/s Mongodb Geospatial

  • Sample Data via Postman
	{"radius":"10","coordinates":[38.8,-77.0]} Data Format - [lat,long]
  • POST Request to URL localhost:4000/api/get_using_self

alt tag

  • POST Request to URL localhost:4000/api/get_using_mongodb

alt tag

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].