<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Olanrewaju A. Olaboye</title>
    <description>The latest articles on DEV Community by Olanrewaju A. Olaboye (@boyepanthera).</description>
    <link>https://dev.to/boyepanthera</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F345842%2F09f9eb3b-79c8-46b8-b36b-3e6023a038cd.jpeg</url>
      <title>DEV Community: Olanrewaju A. Olaboye</title>
      <link>https://dev.to/boyepanthera</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/boyepanthera"/>
    <language>en</language>
    <item>
      <title>How To Upload Multiple files to Cloudinary in Nodejs using Promise.all</title>
      <dc:creator>Olanrewaju A. Olaboye</dc:creator>
      <pubDate>Sat, 01 May 2021 06:52:01 +0000</pubDate>
      <link>https://dev.to/boyepanthera/how-to-upload-multiple-files-to-cloudinary-in-nodejs-using-promise-all-2mk7</link>
      <guid>https://dev.to/boyepanthera/how-to-upload-multiple-files-to-cloudinary-in-nodejs-using-promise-all-2mk7</guid>
      <description>&lt;p&gt;It has remained something confusing while perusing &lt;a href="https://cloudinary.com/" rel="noopener noreferrer"&gt;Cloudinary&lt;/a&gt; documentation on how exactly do you upload multiple images, for most developers what they tend to do is to call the single file upload method on the SDK in a loop, while this seems to work at times it gets buggy when one of the files has to take more time than the other because of the size. To follow along the tutorial you can download the starter boilerplate nodejs with express code from &lt;a href="https://github.com/wonderfulolanrewaju/multi-file-uploader" rel="noopener noreferrer"&gt;Github &lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We need to add multer configuration to our server.js file, then use this to create an. upload middleware function.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First Acts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//clone the repo
git clone https://github.com/wonderfulolanrewaju/multi-file-uploader/blob/master/package.json

//cd into the project
cd multi-file-uploader

//install all dependencies
yarn install

//install nodemon for server restart on save
yarn add -D nodemon

//install new dependencies
yarn add dotenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Second Acts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Add the following object to your package.json
//What this does is allow us to make our server restart on save and run our js file with Esm module so we can use import syntax

 "scripts": {
    "start": "node -r esm server.js",
    "dev: "nodemon -r esm server.js"
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Third Acts: Change the top part of server.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import express from "express";
import cloudinary from "cloudinary";
import multer from "multer";
import dotenv from "dotenv";
dotenv.config();
const app = express();
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
const {
  NODE_ENV,
  PORT: productionPort,
  IP: productionIP,
  cloudinaryName,
  cloudinaryApiKey,
  cloudinaryApiSecret,
} = process.env;
const storage = multer.diskStorage({
  filename: function (req, file, cb) {
    cb(null, file.fieldname + "-" + Date.now());
  },
});

cloudinary.v2.config({
  cloud_name: cloudinaryName,
  api_key: cloudinaryApiKey,
  api_secret: cloudinaryApiSecret,
});

const upload = multer({ storage });

app.get("/", (req, res) =&amp;gt; {
  return res.status(200).json({
    message: "Multiple uploader api",
  });
});

...
if (NODE_ENV === "production") {
...

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Acts Four&lt;/strong&gt;&lt;br&gt;
What we do next is used the upload middleware function created from multer, this middleware's array method :  "upload.array(nameOfFilesFields, maxCount)" takes the name we want to call the file field and the maximum number of images it should allow for upload.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.post("/images", upload.array("pictures", 10), async (req, res) =&amp;gt; {
  try {
    let pictureFiles = req.files;
    //Check if files exist
    if (!pictureFiles)
      return res.status(400).json({ message: "No picture attached!" });
    //map through images and create a promise array using cloudinary upload function
    let multiplePicturePromise = pictureFiles.map((picture) =&amp;gt;
      cloudinary.v2.uploader.upload(picture.path)
    );
    // await all the cloudinary upload functions in promise.all, exactly where the magic happens
    **let imageResponses = await Promise.all(multiplePicturePromise);**
    res.status(200).json({ images: imageResponses });
  } catch (err) {
    res.status(500).json({
      message: err.message,
    });
  }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You can run yarn dev. your app should be running on localhost:9000&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can make a request to &lt;a href="http://localhost9000/images" rel="noopener noreferrer"&gt;http://localhost9000/images&lt;/a&gt; with the form-data request body type using pictures as field name a sample screenshot is shown below&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqf37yeqbjo0ophnuj4e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqf37yeqbjo0ophnuj4e.png" alt="Response screenshot"&gt;&lt;/a&gt;&lt;br&gt;
You can also view the sample response json on a &lt;a href="https://multi-file-uploader.herokuapp.com/sampleresponse.json" rel="noopener noreferrer"&gt;Public directory&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The completed version of the code is available on &lt;a href="https://github.com/wonderfulolanrewaju/multi-file-uploader/tree/completed" rel="noopener noreferrer"&gt;Completed branch on Github&lt;/a&gt; and live version available on &lt;a href="https://multi-file-uploader.herokuapp.com/" rel="noopener noreferrer"&gt;Heroku&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>cloudinary</category>
      <category>multer</category>
    </item>
    <item>
      <title>Build a GeoCoding feature for finding Users around in Nodejs api</title>
      <dc:creator>Olanrewaju A. Olaboye</dc:creator>
      <pubDate>Sun, 18 Oct 2020 21:36:48 +0000</pubDate>
      <link>https://dev.to/boyepanthera/build-a-geocoding-feature-for-finding-users-around-in-nodejs-api-4mg0</link>
      <guid>https://dev.to/boyepanthera/build-a-geocoding-feature-for-finding-users-around-in-nodejs-api-4mg0</guid>
      <description>&lt;p&gt;In recent times it has seemed like a magic that social media applications can show you users they believe live around you and you might probably want to connect with. As a developer at one point in time you will need to track location of users and recommend people they may know to establish friend connection/network.&lt;/p&gt;

&lt;p&gt;In this tutorial I am going to be showing us exactly how to track last login location of a user, save/update this in our database and use this reservoir of data to recommend users around for each user on the platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Basic knowledge of Nodejs, express framework and mongoose ORM&lt;/li&gt;
&lt;li&gt;Knowledge of Token based auth using JWT in nodejs&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Guide&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone and Test the boilerplate code&lt;/li&gt;
&lt;li&gt;Write mongodb/mongoose schema with 2dsphere index.&lt;/li&gt;
&lt;li&gt;Install, configure and use express-ip to grab location users made http request from.&lt;/li&gt;
&lt;li&gt;Query user model for other users around a particular user.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Clone and Test the boilerplate code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git clone https://github.com/WonderfulOlanrewaju/nearby-api-boilerplate.git
2. cd /nearby-api-boilerplate
3. yarn install &amp;amp;&amp;amp; yarn add cross-env 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The three commands above, command one clones the remote repo into your current working directory. Command two changes directory into the copied folder while command tree install all dependencies needed to run the boilerplate code with signup and login with JWT already done.&lt;/p&gt;

&lt;p&gt;create a .env file in the root of your project and add the environment variable&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;secretKey = yoursecretkeyvalue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Make a sample Register request to your api via postman&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvwj89gkh7wvlxdvs2be1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvwj89gkh7wvlxdvs2be1.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make a sample Login request to your api via postman&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F93y6c2fgssyh5ccn6nyl.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F93y6c2fgssyh5ccn6nyl.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Write mongodb/mongoose schema with 2dsphere index.
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Create a file:&lt;/strong&gt;&lt;br&gt;
src/controllers/utils/updateLocation.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { User } from "../../models/User.model";

export const UpdateLastLocation = async (ipInfo, userId) =&amp;gt; {
  let lastLocation = {
    type: "Point",
    coordinates: ipInfo.ll,
  };
  let savedUser = await User.findByIdAndUpdate(
    userId,
    {
      ipInfo,
      lastLocation,
    },
    { new: true }
  );

  return savedUser;
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a utility function which will be used on any route we want to track location of user to extract their logitude and latitude and save it into some fields in the user object from the DB. &lt;/p&gt;

&lt;p&gt;The next step is to update our user model to allow us save ipInfo and lastLocation of user into the DB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a file&lt;/strong&gt;&lt;br&gt;
src/models/User.model.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Mongoose from "mongoose";
import autoIncrement from "mongoose-auto-increment";
let { connection, Schema } = Mongoose;
autoIncrement.initialize(connection);

const pointSchema = new Schema({
  type: {
    type: String,
    enum: ["Point"],
    required: true,
  },
  coordinates: {
    type: [Number],
    required: true,
  },
});

const UserSchema = new Schema({
  firstName: {
    type: String,
    min: 2,
    default: "",
  },
  lastName: { type: String, default: "" },
  email: { type: String, unique: true },
  address: { type: String, default: "" },
  password: { type: String, default: "" },
  ipInfo: {
    ip: { type: String, default: "" },
    range: { type: Array, default: [] },
    country: { type: String, default: "" },
    region: { type: String, default: "" },
    eu: { type: String, default: "" },
    city: { type: String, default: "" },
    ll: { type: Array },
    metro: Number,
    area: Number,
  },
  lastLocation: {
    type: pointSchema,
    default: {
      type: "Point",
      coordinates: [0, 0],
    },
    index: "2dsphere",
  },
});

UserSchema.plugin(autoIncrement.plugin, {
  startAt: 1,
  incrementBy: 1,
  model: "User",
});

export const User = Mongoose.model("User", UserSchema);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What we did above is to update the user model for new fields that allow us save ipInfo and last location of users into the DB.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install, configure and use express-ip to grab location users made http request from.
&lt;/h3&gt;

&lt;p&gt;What the package allows us to do is discover the longitude and latitude a user made a request from alongside some other details like city, timezone and country based on their ip-address.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add express-ip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside add new codes src/app.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//to the upper part before app.get("/")
import { User } from "./models/User.model";
import expressIP from "express-ip";
app.use(expressIP().getIpInfoMiddleware);

//To the lower part before the last line of code add :
app.get("/nearbyusers", async (req, res) =&amp;gt; {
  try {
    const { ipInfo } = req;
    let nearByUsers = await User.find({
      lastLocation: {
        $nearSphere: {
          $geometry: {
            type: "Point",
            coordinates: ipInfo.ll,
          },
          $maxDistance: 10000,
        },
      },
    });
    if (!nearByUsers || nearByUsers.length === 0) {
      res.status(201).json({
        message: "No users near you",
        nearByUser: [],
      });
    } else {
      res.status(201).json({
        message: "Here are users near you",
        nearByUsers,
      });
    }
  } catch (err) {
    res.status(400).json({
      message: `Issues finding nearby users. ${err.message}`,
    });
  }
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;what we have done is import express-ip package and configure it to be available on all routes of our app. And write a route that basically checks the ipInfo of the person calling it then send them an array of users based on 10Km proximity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a new route to your auth controller for fetching a user detail&lt;/strong&gt;&lt;br&gt;
What we want to use this route for is to update the last location and ip details of where a user made his last request from.&lt;/p&gt;

&lt;p&gt;src/controllers/major/auth.controller.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createUser, loginUser } from "../utils/User.util";
import { handleResError, handleResSuccess } from "../utils/response.util";
import JWT from "jsonwebtoken";
import dotenv from "dotenv";
dotenv.config();
const { secretKey } = process.env;

export const SignupController = async (req, res) =&amp;gt; {
  try {
    let userDetails = req.body;
    let { err, user } = await createUser(userDetails);
    if (err) handleResError(res, err, 400);
    else {
      let { _id, email, isActive } = user;
      let options = {
        expiresIn: "12h",
        issuer: "nearby-hasher",
      };
      let token = await JWT.sign({ _id, email, isActive }, secretKey, options);
      handleResSuccess(res, `Account created!`, token, 201);
    }
  } catch (err) {
    handleResError(res, err, 400);
  }
};

export const LoginController = async (req, res) =&amp;gt; {
  try {
    let { err, token } = await loginUser(req.body);
    if (err) handleResError(res, err, 400);
    else handleResSuccess(res, "login successful", token, 201);
  } catch (err) {
    handleResError(res, err, 400);
  }
};

export const FetchAUserController = async (req, res) =&amp;gt; {
  try {
    console.log(req.decoded);
    const { ipInfo } = req;
    let id = req.decoded._id;
    let updatedUser = await UpdateLastLocation(ipInfo, id);
    handleResSuccess(res, "user fetched", updatedUser, 201);
  } catch (err) {
    handleResError(res, err, 400);
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What is done is basically calling our updateLastLocation function supply it the id and ipInfo of user so this will save the user location details into the db.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test the user fetch route&lt;/strong&gt; &lt;br&gt;
ensure to add auth token as Authorization header to the request as in the screenshot below. So the ipInfo of the user can be saved in the DB&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fztf7i2xtl1xwtfiwqulp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fztf7i2xtl1xwtfiwqulp.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update User location on Signup/Login&lt;/strong&gt;&lt;br&gt;
src/controllers/majors/auth.controller.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createUser, loginUser } from "../utils/User.util";
import { handleResError, handleResSuccess } from "../utils/response.util";
import JWT from "jsonwebtoken";
import { User } from "../../models/User.model";
import dotenv from "dotenv";
import { UpdateLastLocation } from "../utils/updateLastLocation";
dotenv.config();
const { secretKey } = process.env;

export const SignupController = async (req, res) =&amp;gt; {
  try {
    let userDetails = req.body;
    let ipInfo = { req };
    let { err, user } = await createUser(userDetails);
    if (err) handleResError(res, err, 400);
    else {
      let { _id, email, isActive } = user;
      await UpdateLastLocation(ipInfo, _id);
      let options = {
        expiresIn: "12h",
        issuer: "nearby-hasher",
      };
      let token = await JWT.sign({ _id, email, isActive }, secretKey, options);
      handleResSuccess(res, `Account created!`, token, 201);
    }
  } catch (err) {
    handleResError(res, err, 400);
  }
};

export const LoginController = async (req, res) =&amp;gt; {
  try {
    let ipInfo = { req };
    let { err, token } = await loginUser(req.body);
    let user = await User.findOne({ email: req.body.email });
    await UpdateLastLocation(ipInfo, user._id);
    if (err) handleResError(res, err, 400);
    else handleResSuccess(res, "login successful", token, 201);
  } catch (err) {
    handleResError(res, err, 400);
  }
};

export const FetchAUserController = async (req, res) =&amp;gt; {
  try {
    console.log(req.decoded);
    const { ipInfo } = req;
    let id = req.decoded._id;
    let updatedUser = await UpdateLastLocation(ipInfo, id);
    handleResSuccess(res, "user fetched", updatedUser, 201);
  } catch (err) {
    handleResError(res, err, 400);
  }
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add start script to package.json and push app to heroku because the live testing of the nearbyusers route needs to be on a live server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;package.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"start": "node -r esm ./src/server.js"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Push to heroku&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ensure you have your heroku CLI loggedIn&lt;/li&gt;
&lt;li&gt;Ensure you add your live mongodb Database connection strin&lt;/li&gt;
&lt;li&gt;Type in the following commands one after the other on your terminal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can compare your work with my &lt;a href="https://github.com/WonderfulOlanrewaju/nearby-api" rel="noopener noreferrer"&gt;Final Repo&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku create 
git add .
git commit -m 'heroku push
git push heroku master || git push heroku main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reason for adding git push heroku main is because master is now renamed as main in recent Github repo creation.&lt;/p&gt;

&lt;p&gt;Visit the documentation on &lt;a href="https://documenter.getpostman.com/view/13086801/TVRrWQdv" rel="noopener noreferrer"&gt;Postman Documentation&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create two users on the live API with different emails&lt;/li&gt;
&lt;li&gt;Call the fetch user route &lt;/li&gt;
&lt;li&gt;Then on another browser visit &lt;a href="https://nearby-user-api.herokuapp.com/nearbyusers" rel="noopener noreferrer"&gt;LiveAPI&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It will show you the two users you created because they live around you.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is my first tutorial, kindly comment things to improve on in the comment section.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>mongodb</category>
      <category>geocoding</category>
      <category>express</category>
    </item>
  </channel>
</rss>
