0% found this document useful (0 votes)
13 views61 pages

Url Shortner

The project report outlines the development of an efficient link shortener using Node.js and MongoDB, aimed at creating compact URLs that are easy to share while ensuring user awareness of the original destination. It addresses the limitations of existing URL shorteners, such as the potential for misuse by hackers, by providing features like malware detection and user-friendly clues about the original URLs. The report includes acknowledgments, system analysis, requirements, and an overview of the methodology for implementing the project.

Uploaded by

egsppcse2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views61 pages

Url Shortner

The project report outlines the development of an efficient link shortener using Node.js and MongoDB, aimed at creating compact URLs that are easy to share while ensuring user awareness of the original destination. It addresses the limitations of existing URL shorteners, such as the potential for misuse by hackers, by providing features like malware detection and user-friendly clues about the original URLs. The report includes acknowledgments, system analysis, requirements, and an overview of the methodology for implementing the project.

Uploaded by

egsppcse2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

896, E.G.S.

PILLAY POLYTECHNIC COLLEGE


NAGAPATTINAM-611002

DEPARTMENT OF COMPUTER ENGINEERING


PROJECT REPORT
2023-2024
TO BUILD AN EFFICIENT LINK SHORTNER AND MAKING BY URL
COMPACTIVELY STORED AND SHARED BY USING NODE JS AND
MONGO DB
SUBMITTED BY
S.NO NAME REGISTER NUMBER
1. BUJANDESWARAN.V 22505570
2. DEEPIKA.K 22505571
3. DINESH.R 22505572
4. SETHUMARAN.S 22505601
5. SHAYILUMARY.P 22505603
6. SATHEESH.K 22592530

UNDER THE GUIDANCE OF


Mrs. S. SHAJINI M.E.,
Project Report Submitted in partial fulfilment of the requirement for the
“DIPLOMA IN COMPUTER ENGINEERING”

DIRECTORATE OF TECHNICAL EDUCATION


CHENNAI-600025.
896, E.G.S. PILLAY POLYTECHNIC COLLEGE
NAGAPATTINAM-611002

BONAFIDE CERTIFICATE

Register No: ……………………………….

This is to certify that this project work “TO BUILD AN EFFICIENT LINK
SHORTNER AND MAKING BY URL COMPACTIVELY STORED AND
SHARED BY USING NODE JS AND MONGO DB “is the Bonafide Work
done by Mr/Miss………………………………………………….in partial
fulfilment of the requirements for the Diploma in Computer Engineering during
the academic year of 2023-2024.

Guide signature Head of the Department

Submitted for the Board project Work held on……………………………….

Internal Examiner External Examiner


ACKNOWLEDGEMENT

I would like to express my sincere thanks to E.G.S.PILLAY & SONS


EDUCATIONAL AND CHARITABLE TRUST and our honorable secretary
Thiru G.S.SENTHIL KUMAR, Joint secretary Thiru G.S.SHANKAR
GANESH, Advisor of our institution chevy. Thiru
G.S.PARAMESWARAN,M.Com., F.C.C.A(UK)and respect Director Tmt.
SUMATHI PARAMESWARAN, M.Com, M.Phil., for permitting me to carry
out this project work.

I deem it a privilege of this prestigious institution first and for most we


express as a acknowledgement to Prof. A. DHANASEKAR, M.E., Principal,
E.G.S. Pillay Polytechnic College, Nagapattinam for granting this opportunity.

I am deeply grateful to our head of the department and project


coordinator, Mrs. S. SHAJINI, M.E., for his wide knowledge, serious research
attitude and enthusiasm given to us.

I am thankful to our guide Mrs. S. SHAJINI, M.E., Department of


Computer Engineering for this noble endeavor in encouraging to do our project.

• Mrs. B. LOGANAYAKI., MTech., (Lecturer/CSE)


• Mrs. S. SARANYA, M.E., (Lecturer/CSE)
• Miss. K. RAHAPRIYA., B.E., (Lecturer/CSE)
• Mrs. S. SHOBANAPRIYA., B.E., (Lecturer/CSE)
• Mr. B. VENGATRAGAVAN., (System Administrator)

My humble gratitude and thanks to my parents who have supported and


helped me to complete the project Work. I also thanks to our department
instructors and my friends for their constant moral support and encouragement
towards the project.
ABSTRACT

A URL shortened decreases the length of the URL for you. Large URLs
can be complicated to remember or share with others. A shortened URL version
can help you share your favorite link more easily. A URL shortener can help you
in many other ways as well. For example, Links shortened with the same tool like
nearly identical, at least for the domain section. This overall increases the
authenticity of the URL. Also, adding a large and complicated URL in your social
media bio or where the link is clearly visible looks cluttered. Instead, a shortened
URL looks professional and minimal. A shortened URL further lets you easily
track the number of clicks to the page. This is not possible using Third-party
websites without a URL shortener. These metrics can help you measure the
performance of the link. They limit the number of shortened URLs you can
generate. Using your own URL shortening services will cost you a lot less if you
set it up properly in a cloud hosting services, like AWS. And if you are eligible
for the AWS free tier, you can easily run your basic URL shortening services for
free for a complete year excluding the domain name changes. Next, Mostly URL
shortening services don’t allow you to use custom domains for your shortened
URLs. The options for using a custom domain charges a lot extra. But without
using custom domain Your brand will not stand out. Finally, most of the free or
basic plans of URL shortening services don’t allow you to view analytics. But by
doing some simple tweaks in your custom application, you can easily track the
analytics, like how many clicks were made to the link. The basic workings of a
URL shortener is a straightforward. In the short URL generation part, the API
takes in a POST request with the original URL as a pay load, A unique ID is
generated that corresponds to the original URL. This ID is added to the end of the
base URL. The generated URL and the original URL are stored in the database.
TABLE OF CONTENT

CHAPTER TITLE PAGE NO


NO

ABSTRACT

1 INTRODUCTION 1

2 SYSTEM ANALYSIS 3

3 SYSTEM REQUIREMENTS 5

4 PROGRAMMING LANGUAGE 6

5 PROJECT OVERVIEW 8

6 MODULES 17

7 SOURCECODE 19

8 SCREEN SHOTS 51

9 REFERENCE 54

10 CONCLUSION 56
1

CHAPTER-1

INTRODUCTION

For several years now, research has looked at phishing website removal
times and the number of visitors that the website attracts. Surprisingly very little
research has looked at answering the same questions for malware websites. One
reason for this may be because the data needed to perform such an analysis is
generally hard to come by. Research that looks at phishing website removal times
and number of visitors mostly makes use of resources such as log files, third party
resources, and honeypots to gather data. How ever the last two resources are not
always easy to get a hold of or to set up. As for the first resource option, log files
are becoming scarce since people are instead using tools such as Google analytics
to track their website click traffic. These analytics are not public information for
understandable reasons. URL shortening services, which provide users with a
smaller equivalent of any provided long URL, are an example of a service which
sometimes provide analytics as public information on their shortened URLs.
Some URL shortening providers such as bit.ly1 or goo.gl2, allow viewing in real
time the click traffic of a given short URL, including referrers and countries
referring it. Unfortunately, attackers abuse URL shortening services, perhaps to
mask the final destination where the victim will land after clicking on the
malicious link. In our research we make use of the Bitly URL shortening service,
reportedly the most popular service to analyze clicks for phishing and malware
attacks. By phishing attacks, we mean websites that trick a user into providing
personal or financial information by falsely claiming to be a legitimate website.
By malware attacks we mean websites that install data transmitting programs
without the user’s knowledge. We rely on two independent services to gather and
classify these attacks: we use the popular community driven portal PhishTank3
as a main source of phishing attack reports, as well as IBM’s threat intelligence
sharing platform X-Force Exchange4 for both phishing and malware attacks. We
2

first gathered over 300,000 malicious URLs categorized as phishing or malware


along with their reported date, and of these we identified over 7,000 Bitly short
URLs. We then fetched click analytics from Bitly for each of these short URLs.
From our analysis, we find that phishing attacks are most active 4 hours before
the reported date, while malware attacks are most active 4 days before the
reported date. We also find that phishing attacks have higher click through rate
than malware, but that malware attacks have longer timespan than phishing. We
also show the comparisons of referrers and countries from which short URLs are
accessed, showing in particular an increased use of social media to spread both
kinds of attacks. We also find phishing clicks mainly come from USA and Brazil,
while malware clicks mainly come from USA and Russia. Over all we find that
the efforts against phishing attacks are stronger than the efforts against malware
attacks, based on the observation that 50% of malware URLs last for several
years, while less than half of phishing URLs are active past 3 months. This work
provides a new and comparative insight about the life cycle of phishing and
malware attacks. Our work adds to the analysis on the life cycle of phishing
attacks from the perspective of short URLs, an ever-increasing strategy that
attackers use to obfuscate malicious URLs. As far as we are aware, our work also
constitutes possibly the first analysis on the life cycle of malware URLs with
respect to timespan and number of visitors, that is not limited to a single
Enterprise or University. In addition, this work complements previous short URL
analyses, with new findings about click activity for flagged short URLs, and new
analyses looking at the time span of malicious short URLs. From our analysis of
short URLs, we also find that Twitter spam click activity has remained consistent
since 2010.
3

CHAPTER -2

SYSTEM ANALYSIS

EXISTING SYSTEM

The existing URL Shortener is used to create neat, attractive, beautiful


URLs which is easy to remember by the users. In URL shortening, every long
URL is associated with a unique key, which is the part after its top-level domain
name. Some of the existing URL shorteners are Bitly, Clkim, Cloud App, and
Droplr. The user has no idea or clue about the destination URL. So, hackers may
misuse this shortened URL and redirect them to phishing and malware websites.
Phishing is the illegal attempt to obtain valuable information like card details,
login ids, passwords. It is usually done for illegal reasons by identifying as a valid
entity in an digital communication. Some Emails may contain a redirection link
to the websites

DISADVANTAGES

• The URL should be a valid URL.

• The websites returning status code like 400,401,402 etc. should


not be shortened.

.
4

PROPOSED SYSTEM

Our proposed system resolves issues in the existing system and


provides confidentiality and authenticates the exact website of the original URL
and provides user awareness when shortening the URL by appending a small clue
about the domain name of the destination website. This provides user awareness
and confidence about the shortened URL’s. For example, if the URL of original
website is www.amazon.com/products/mobile/samsung, then the shortened URL
is https://bit.ly/2VXFP84ama thus there is a small clue about the original website.
So, they can be prevented from the trap of being redirected to the unwanted
phishing and malware websites. Another feature is to verify whether the original
website contains any malware. If the malware is detected shortened URL will not
be generated and the user will warn about the malware. The proposed work
prevents the user from the trap of hackers or intruders by redirecting those
unwanted phishing and malware websites. It consists of three layers Application
tier, Network Layer, Database layer. The application Layer is developed using
HTML, CSS and JavaScript. It is the layer in which the user interacts with the
application and enters the original URL.

ADVANTAGES

• By this system we can provide a security to your URL.

• To avoid the spamming of URL by making a bot attack.


5

CHAPTER-3

SYSTEM REQUIREMENT

HARDWARE SPECIFICATION

Ram : 4GB

Processor : AMD PRO A4-4350B R4,5 COMPUTE CORES 2C+ 3G 2.50GHZ

System type: 64-bit OPERATING SYSTEM

SOFTWARE SPECIFICATION

Operating system : Windows 10

Frontend : HTML,CSS,JAVA SCRIPT

Backend :Node.js
6

CHAPTER-4

PROGRAMMING LANGUAGE

Cascading Style Sheets (CSS) is a language used for describing the


look and formatting of HTML documents. CSS has been widely adopted in web
and mobile development practice, since it enables a clean separation of content
from presentation. The language exhibits complex features, such as inheritance,
cascading and specificity, which make CSS code hard to maintain. Therefore, it
is important to find ways to improve the maintainability of CSS code. In this
paper, we propose an automated approach to remove duplication in CSS code.
More specifically, we have developed a technique that detects three types of CSS
declaration duplication and recommends refactoring opportunities to eliminate
those duplications. Our approach uses preconditions that ensure the application
of a refactoring will preserve the original document styling. We evaluate our
technique on 38 real-world web systems and CSS files, in total. Our findings
show that duplication in CSS code is widely prevalent. Additionally, there is a
significant number of presentation-preserving refactoring opportunities that can
reduce the size of the CSS files and increase the maintainability of the code

JavaScript is a powerful and flexible prototype-based scripting


language that is increasingly used by developers to create interactive web
applications. The language is interpreted, dynamic, weakly-typed, and has first-
class functions. In addition, it interacts with other web languages such as CSS
and HTML at runtime. All these characteristics make JavaScript code particularly
error-prone and challenging to write and maintain. Code smells are patterns in the
source code that can adversely influence program comprehension and
maintainability of the program in the long term. We propose a set of JavaScript
code smells, collected from various developer resources. We present a JavaScript
code smell detection technique called JSNOSE. Our metric-based approach
7

combines static and dynamic analysis to detect smells in client-side code. This
automated technique can help developers to spot code that could benefit from
refactoring. We evaluate the smell finding capabilities of our technique through
an empirical study. By analyzing web applications, we investigate which smells
detected by JSNOSE are more prevalent

The transformation of scanned paper documents to a form suitable for


an Internet browser is a complex process that requires solutions to several
problems. The application of an OCR to some parts of the document image is
only one of the problems. In fact, the generation of documents in HTML format
is easier when the layout structure of a page has been extracted by means of a
document analysis process. The adoption of an XML format is even better, since
it can facilitate the retrieval of documents in the Web. Nevertheless, an effective
transformation of paper documents into this format requires further processing
steps, namely document image classification and understanding. WISDOM++ is
a document processing system that operates in five steps: document analysis,
document classification, document understanding, text recognition with an OCR,
and text transformation into HTML/XML format. The innovative aspects
described in the paper are: the preprocessing algorithm, the adaptive page
segmentation, the acquisition of block classification rules using techniques from
machine learning, the layout analysis based on general layout principles, and a
method that uses document layout information for conversion to HTML/XML
formats. A benchmarking lamenting these innovative aspects is reported.
8

CHAPTER-5

PROJECT OVERVIEW

METHODOLOGY

URL shortening is a technique on the World Wide Web in which a


Uniform Resource Locator (URL) may be made substantially shorter and still
direct to the required page. This is achieved by using a redirect which links to the
web page that has a long URL. For example, the URL
"https://example.com/assets/category B/subcategory C/Foo/" can be shortened to
"https://example.com/Foo", and the URL "https://en.wikipedia.org/wiki/URL
shortening" can be shortened to "https://w.wiki/U". Often the redirect domain
name is shorter than the original one. A friendly URL may be desired for
messaging technologies that limit the number of characters in a message (for
example SMS), for reducing the amount of typing required if the reader is copying
a URL from a print source, for making it easier for a person to remember, or for
the intention of a permalink. In November 2009, the shortened links of the URL
shortening service Bitly were accessed 2.1 billion times.

Other uses of URL shortening are to "beautify" a link, track clicks, or


disguise the underlying address. This is because the URL shortener can redirect
to just about any web domain, even malicious ones. So, although disguising of
the underlying address may be desired for legitimate business or personal reasons,
it is open to abuse. Some URL shortening service providers have found
themselves on spam blocklists, because of the use of their redirect services by
sites trying to bypass those very same blocklists. Some websites prevent short,
redirected URLs from being posted.
9

Purposes

There are several reasons to use URL shortening. Often regular unshorten
links may be aesthetically unpleasing. Many web developers pass descriptive
attributes in the URL to represent data hierarchies, command structures,
transaction paths or session information. This can result in URLs that are
hundreds of characters long and that contain complex character patterns. Such
URLs are difficult to memorize, type out or distribute. As a result, long URLs
must be copied and pasted for reliability. Thus, short URLs may be more
convenient for websites or hard copy publications (e.g. a printed magazine or a
book), the latter often requiring that very long strings be broken into multiple
lines (as is the case with some e-mail software or internet forums) or truncated.
On Twitter and some instant messaging services, there is a limit to the number of
characters a message can carry – however, Twitter now shortens links
automatically using its own URL shortening service, t.co, so there is no need to
use a separate URL shortening service just to shorten URLs in a tweet. On other
such services, using a URL shortener can allow linking to web pages which would
otherwise violate this constraint. Some shortening services, such as goo.gl,
tinyurl.com, and bit.ly can generate URLs that are human-readable, although the
resulting strings are longer than those generated by a length-optimized service.
Finally, URL shortening sites provide detailed information on the clicks a link
receives, which can be simpler than setting up an equally powerful server-side
analytics engine, and unlike the latter, does not require any access to the server

URLs encoded in two dimensional barcodes such as QR code are often


shortened by a URL shortener in order to reduce the printed area of the code, or
allow printing at lower density in order to improve scanning reliability.
10

Registering a short URL

Some websites create short links to make sharing links via instant
messaging easier, and to make it cheaper to send them via SMS. This can be done
online, at the web pages of a URL shortening service to do it in batch via bulk
upload with tools like CSV importer or on demand may require the use of an API.

A few well-known websites have set up their own URL shortening


services for their own use – for example, Twitter with t.co, Google with g.co, and
GoDaddy with x.co.

Techniques

See also: URL redirection

In URL shortening, every long URL is associated with a unique key, which is the
part after its top-level domain name. For example, https://tinyurl.com/m3q2xt has
a key of m3q2xt, these keys are case-sensitive most of the time and using the
wrong case may lead to a different destination URL. Not all redirection is treated
equally; the redirection instruction sent to a browser can contain in its header
HTTP response status codes such as 301 (moved permanently), 302 (found), 307
(temporary redirect) or 308 (permanent redirect).

There are several techniques to implement URL shortening. Keys can be


generated in base 36, assuming 26 letters and 10 numbers. In this case, each
character in the sequence will be 0, 1, 2, ..., 9, a, b, c, ..., y, z. Alternatively, if
uppercase and lowercase letters are differentiated, then each character can
represent a single digit within a number of base 62 (26 + 26 + 10). In order to
form the key, a hash function can be made, or a random number generated so that
key sequence is not predictable. Or users may propose their own custom keys.
11

Not all URI schemes are capable of being shortened as of 2011, although URI
schemes such as http, https, ftp, ftps, mail to, mms, rtmp, rtmpt, ed2k, pop, imap,
nntp, news, ldap, gopher, dict and dns are being addressed by such services as
URL shorteners. Typically, data: and JavaScript: URLs are not supported for
security reasons (to combat attacks like cross-site scripting and session
hijacking). Some URL shortening services support the forwarding of mail to
URLs, as an alternative to address munging, to avoid unwanted harvest by web
crawlers or bots. This may sometimes be done using short, CAPTCHA-protected
URLs, but this is not common.

Makers of URL shorteners usually register domain names with less


popular or esoteric Top-level domains in order to achieve a short URL and a
catchy name, often using domain hacks. This results in registration of different
URL shorteners with a myriad of different countries, leaving no relation between
the country where the domain has been registered and the URL shortener itself or
the shortened links. Top-level domains of countries such as Libya (.ly), Samoa
(.ws), Mongolia (.mn), Malaysia (.my) and Liechtenstein (.li) have been used as
well as many others. In some cases, the political or cultural aspects of the country
in charge of the top-level domain may become an issue for users and owners, but
this is not usually the case

Services may record inbound statistics, which may be viewed publicly


by others. Expiry and time-limited services While many providers claim their
shortened URLs won't expire for as long as the service is provided, they may
decide to discontinue the service at any time. A permanent URL is not necessarily
a good thing. There are security implications, and obsolete short URLs remain in
existence and may be circulated long after they cease to point to a relevant or
even extant destination. Sometimes a short URL is useful simply to give someone
over a telephone conversation for a one-off access or file download, and no longer
needed within a couple of minutes. Some providers offer expiration on shortened
12

URLs. This may include URLs that expire after a certain amount of time, on a
certain date or after a certain number of usages.[citation needed] A Microsoft
Security Brief recommends the creation of short-lived URLs, but for reasons
explicitly of security rather than convenience.

Abuse

URL shortening may be utilized by spammers or for illicit internet


activities. As a result, many have been removed from online registries or shut
down by web hosts or internet service providers.

According to Tonic Corporation, the registry for .to domains, it is "very


serious about keeping domains spam free" and may remove URL shortening
services from their registry if the service is abused. In addition, "u.nu" made the
following announcement upon closing operations: The last straw came on
September 3, 2010, when the server was disconnected without notice by our
hosting provider in response to reports of a number of links to child pornography
sites. The disconnection of the server caused us serious problems, and to be
honest, the level and nature of the abuse has become quite demoralizing. Given
the choice between spending time and money to find a different home, or just
giving up, the latter won out. Google's URL-shortener discussion group has
frequently included messages from frustrated users reporting that specific
shortened URLs have been disabled after they were reported as spam. A study in
May 2012 showed that 61% of URL shorteners had shut down .The most common
cause cited was abuse by spammers.

Linkrot

The convenience offered by URL shortening also introduces potential


problems, which have led to criticism of the use of these services. Short URLs,
for example, will be subject to linkrot if the shortening service stops working; all
URLs related to the service will become broken. It is a legitimate concern that
13

many existing URL shortening services may not have a sustainable business
model in the long term In late 2009, the Internet Archive started the "301 Works"
projects, together with twenty collaborating companies (initially), whose short
URLs will be preserved by the project.

Transnational law

Shortened internet links typically use ccTLD domains, and are therefore
often under the jurisdiction of a nation other than where the service provider is
located. Libya, for instance, exercised its control over the .ly domain in October
2010 to shut down vb.ly for violating Libyan pornography laws. Failure to predict
such problems with URL shorteners and investment in URL shortening
companies may reflect a lack of due diligence.

Blocking and banning

Some websites prevent short, redirected URLs from being posted. In


April 2009, Tiny URL was reported to be blocked in Saudi Arabia.[29] Yahoo!
Answers blocks postings that contain Tiny URLs,[citation needed] and Wikipedia
does not accept links by any URL shortening services in its articles.[30] The
Reddit community strongly discourages— and in some subreddits, outright
bans— URL shortening services for link submissions, because they disguise the
origin domain name and whether the link has previously been submitted to
Reddit, and there are few or no legitimate reasons to use link shorteners for Reddit
link submissions.

Privacy and security

A short URL obscures the target address and can be used to redirect to
an unexpected site. Examples of this are "rick rolling", and redirecting to shock
sites, or to affiliate websites. The short URL can allow blocked URLs to be
accessed, bypassing site blocklists; this facilitates redirection of a user to blocked
scam pages or pages containing malware or XSS attacks. Tiny URL tries to
14

disable spam-related links from redirecting. Zone Alarm, however, has warned
its users: "Tiny URL may be unsafe. This website has been known to distribute
spyware." Tiny URL countered this problem by offering an option to view a link's
destination before using a shortened URL. This ability is installed on the browser
via the Tiny URL website and requires the use of cookies.[33] A destination
preview may also be obtained by prefixing the word "preview" to the URL of the
Tiny URL; for example, the destination of https://tinyurl.com/8kmfp is revealed
by entering https://preview.tinyurl.com/8kmfp. Other URL shortening services
provide a similar destination display. Security professionals suggest that users
check a short URL's destination before accessing it, following an instance where
the shortening service cli.gs was compromised, exposing millions of users to
security uncertainties. There are several web applications that can display the
destination URL of a shortened URL.

Some URL shortening services filter their links through bad-site


screening services such as Google Safe Browsing. Many sites that accept user-
submitted content block links, however, to certain domains in order to cut down
on spam, and for this reason, known URL redirection services are often
themselves added to spam blocklists.

Another privacy problem is that many services' shortened URL format


is small enough that it is vulnerable to brute-force search. Many people use URL
shorteners when they share links to private content, and in fact many web services
like Google Maps have offered automatic generation of shortened links for
driving directions that reveal personal information like home addresses and
sensitive destinations like "clinics for specific diseases (including cancer and
mental diseases), addiction treatment centers, abortion providers, correctional
and juvenile detention facilities, payday and car-title lenders, gentlemen's clubs,
etc.
15

Additional layer of complexity

Short URLs, although making it easier to access what might otherwise


be a very long URL or user-space on an ISP server, add an additional layer of
complexity to the process of retrieving web pages. Every access requires more
requests (at least one more DNS lookup, though it may be cached, and one more
HTTP/HTTPS request), thereby increasing latency, the time taken to access the
page, and also the risk of failure, since the shortening service may become
unavailable. Another operational limitation of URL shortening services is that
browsers do not resend POST bodies when a redirect is encountered. This can be
overcome by making the service a reverse proxy, or by elaborate schemes
involving cookies and buffered POST bodies, but such techniques present
security and scaling challenges, and are therefore not used on extranets or
Internet-scale services.
16

BLOCK DIAGRAM
17

CHAPTER-6

MODULES

TL;DR: Building a URL shortener in Node.js The basic workings of a URL


shortener is straightforward. In the short URL generation part, the API takes in a
POST request with the original URL as a payload. A unique ID is generated that
corresponds to the original URL. This ID is added to the end of the base URL,
i.e., the URL of your application.

Create Project Directory Open the terminal and go to the path where you want
to create the project and create a folder with your project name. Step 3: Install
the dependencies like express, node Mon etc. This will create package-lock.
Json file and node modules folder.

Initialize a new NodeJS Create a new empty directory in your development


environment and run npm in it. You'll then answer a few basic questions about
your project, and npm will create a new package. Json file for you when you're
done. This utility will walk you through creating a package.

Install the necessary packages. Open the command line interface and tell NPM
to download the package you want. Now you have downloaded and installed your
first package! NPM creates a folder named "node modules", where the package
will be placed. All packages you install in the future will be placed in this folder.

Set up the env NodeJS Install the Node Nv package. Now that you have
initialized the project in the above section and created a package. Json file

Project structure Now, we can delve into what I commonly refer to as the
application structure flow, which encompasses a set of rules and common
practices aimed at enhancing the Node.js developer experience. The best
practices outlined below can serve as a cheat sheet to assist you in establishing
the ideal architecture flow for your upcoming project.
18

Create URL The get () method returns the first value found for the given query
parameter. So, if there is a duplicate query parameter, only the value of the first
one will be returned. You can use the get All () method to return all values for a
given query parameter
19

CHAPTER-7

SOURCE CODE

App.js

const express = require('express')


const app = express()
const exphbs = require('express-handlebars')
const mongoose = require('mongoose')

// Include controller
const convert Controller = require('./controllers/convert')
const home Controller = require('./controllers/home')

const port = 3000

// connect mongoose with database


mongoose. Connect(process.env.MONGODB_URI || 'mongodb://localhost/url',
{ useNewUrlParser: true })

const db = mongoose. Connection

// error connection
db. On('error', () => {
console.log ('MongoDB error!')
})

// successful connection
db. Once('open', () => {
console.log('MongoDB connected!')
})

// Include user model


const URL = require('./models/URL')

// set up handlebars
app. Engine ('handlebars', exphbs({ default Layout: 'main' }))
app. Set ('view engine', 'handlebars')

// serve static files


App .use (express. Static('public'))
20

app.get('/', home Controller)

app.get('/convert', convertController.getShortened)

app.get('/:shortened URL', convertController.getOriginal)

app.listen(process.env.PORT || port, () => {


console.log('App is running')
})

url.js

const mongoose = require('mongoose')


const Schema = mongoose. Schema

const URL Schema = new Schema({


original URL: {
type: String,
required: true
},
shortened URL: {
type: String,
required: true
}
})

module. Exports = mongoose. Model('URL', URL Schema)

index.js
const urlForm = document.querySelector('form')
const URL Result = document.getElementById('url-result')
const input URL = urlForm.querySelector('[name="url"]')
const resetBtn = document.getElementById('reset')

function copy URL() {


var copyText = document.getElementById("result");
copyText.select();
document.execCommand("copy");
}

function handleAnimationEnd(event) {
21

return event.target.classList.remove('animated', 'bounceIn')


}

urlForm.addEventListener('submit', event => {

event.preventDefault()
urlForm.classList.add('was-validated')
if (!inputUrl.checkValidity()) { return }
fetch(`${window.location.href}convert?url=${inputUrl.value}`)
.then(data => {
return data.json()
})
.then(shortenedUrl => {
urlResult.classList.remove('d-none')
urlResult.classList.add('animated', 'bounceIn')
urlResult.addEventListener('animation end', handleAnimationEnd)
urlResult.querySelector('[name="result"]').value =
`${window.location.href}${shortenedUrl.url}`

// add event listener to copy button


document.getElementById('copy-btn').addEventListener('click', copyUrl)
})
})

resetBtn.addEventListener('click', event => {


// clear user input column
inputUrl.value = ''
// clear url result column
urlResult.querySelector('[name="result"]').value = ''
// reset the form
urlResult.classList.add('d-none')
urlForm.classList.remove('was-validated')
// add animation to input
inputUrl.classList.add('animated', 'bounceIn')
inputUrl.addEventListener('animationend', handleAnimationEnd)
})

Index.css
body {
font-family: 'Bangers', cursive;
}

section {
22

max-width: 500px;
margin: 0 auto;
}

.link-picture .fa-link:before {
background: -webkit-linear-gradient(45deg,#1fddff,#1fddff 50% ,#ff4b1f
50%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

input {
font-family: 'Caveat', cursive;
font-weight: 700;
}

.form-control:hover,
.form-control:focus {
border-color: #686868;
}

.form-control:focus,
.form-control.is-valid:focus, .was-validated .form-control:valid:focus,
.form-control.is-invalid:focus, .was-validated .form-control:invalid:focus {
box-shadow: none;
}

.form-control.is-valid, .was-validated .form-control:valid,


.form-control.is-valid:focus, .was-validated .form-control:valid:focus {
border-color: #686868;
background: none;
padding-right: inherit;
}

Main.handlebars
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
23

<meta http-equiv="X-UA-Compatible" content="ie=edge">


<title>URL Shortener</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/5.9.0/css/all.css">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-
ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2
MZw1T" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Bangers&display=swap"
rel="stylesheet">
<link
href="https://fonts.googleapis.com/css?family=Caveat:700&display=swap"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css"
>
<link rel="stylesheet" href="/stylesheets/index.css">
</head>

<body>
{{{body}}}
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-
q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6j
izo"
crossorigin="anonymous"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-
UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIH
NDz0W1"
crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-
JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07j
RM"
crossorigin="anonymous"></script>
<script src="/javascripts/index.js"></script>
</body>

</html>
24

Index.handlebars

<section class="d-flex flex-column justify-content-center vh-100">


<h1 class="text-center title display-3 my-0 animated heartBeat">URL
Shortener</h1>
<h1 class="display-1 text-center my-5 link-picture animated
jackInTheBox"><i class="fas fa-link"></i></h1>
<form class="w-75 mx-auto d-flex flex-column align-items-center animated
jackInTheBox" novalidate>
{{#if error}}
<div class="alert alert-danger alert-dismissible fade show w-100"
role="alert">
{{error}}
<button type="button" class="close" data-dismiss="alert" aria-
label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{{/if}}
<div class="form-group w-100">
<label for="url" class="sr-only"></label>
<input type="url" name="url" id="url" class="form-control"
pattern="https?://.+" value="{{inputUrl}}"
placeholder="Your Website URL" required>
<div class="invalid-feedback">
Please enter a valid url starting with: http:// or https://
</div>
</div>
<div class="input-group w-100 d-none" id="url-result">
<input type="url" id="result" name="result" class="form-control">
<div class="input-group-append mb-3">
<button class="btn btn-outline-secondary" type="button" id="copy-
btn">Copy</button>
</div>
</div>
<div class="buttons d-flex w-100 justify-content-center mt-3">
<button class="btn btn-primary mr-4 px-5" id="submit">Submit</button>
<button class="btn btn-danger px-5" id="reset"
type="button">Reset</button>
</div>
</form>
</section>
25

<span></span>
Package-lock.json

{
"name": "url-shortener",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "url-shortener",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"express-handlebars": "^3.1.0",
"mongoose": "^5.6.6"
}
},
"node_modules/accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"integrity": "sha512-
Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3
WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"dependencies": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-
1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"node_modules/asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
26

},
"node_modules/async": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
"integrity": "sha512-
H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/y
CW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
"dependencies": {
"lodash": "^4.17.11"
}
},
"node_modules/balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-
1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"node_modules/bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-
MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQS
Gczs5jZVxV339chE8iwk6F64wjA=="
},
"node_modules/body-parser": {
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-
1.19.0.tgz",
"integrity": "sha512-
dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4
XWW9CuFNK22krhrj1+rgzifNCsw==",
"dependencies": {
"bytes": "3.1.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.2",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"on-finished": "~2.3.0",
"qs": "6.7.0",
"raw-body": "2.4.0",
"type-is": "~1.6.17"
},
27

"engines": {
"node": ">= 0.8"
}
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-
1.1.11.tgz",
"integrity": "sha512-
iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYF
ldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/bson": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.1.1.tgz",
"integrity": "sha512-
jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIb
m2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg==",
"deprecated": "Fixed a critical issue with BSON serialization documented in
CVE-2019-2391, see https://bit.ly/2KcpXdo for more details",
"engines": {
"node": ">=0.6.19"
}
},
"node_modules/bytes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"integrity": "sha512-
zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aH
BLZSMOopbzwv8f+wZcVzfVTI2Dg==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-
2.20.0.tgz",
28

"integrity": "sha512-
7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQ
R4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"optional": true
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"node_modules/content-disposition": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-
disposition-0.5.3.tgz",
"integrity": "sha512-
ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8
G6uBJjkqLrhT0qEYFcWng8z1z0g==",
"dependencies": {
"safe-buffer": "5.1.2"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-
1.0.4.tgz",
"integrity": "sha512-
hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQ
LXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
"integrity": "sha512-
+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6
ZaPDOUbnjOt/99w66zk+l1Xg==",
"engines": {
"node": ">= 0.6"
29

}
},
"node_modules/cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-
1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-
bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDj
m/E7AdgFBVeAPVMNcKGsHMA==",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-
1.1.3.tgz",
"integrity": "sha512-
3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46I
YYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"dependencies": {
"object-keys": "^1.0.12"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
30

"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"node_modules/etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/express": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
"integrity": "sha512-
mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w
2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
"dependencies": {
"accepts": "~1.3.7",
"array-flatten": "1.1.1",
"body-parser": "1.19.0",
"content-disposition": "0.5.3",
"content-type": "~1.0.4",
"cookie": "0.4.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
31

"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "~1.1.2",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.5",
"qs": "6.7.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.1.2",
"send": "0.17.1",
"serve-static": "1.14.1",
"setprototypeof": "1.1.1",
"statuses": "~1.5.0",
"type-is": "~1.6.18",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
},
"engines": {
"node": ">= 0.10.0"
}
},
"node_modules/express-handlebars": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/express-handlebars/-/express-
handlebars-3.1.0.tgz",
"integrity": "sha512-
7QlaXnSREMmN5P2o4gmpUZDfJlLtfBka9d6r7/ccXaU7rPp76odw9YYtwZY
dIiha2JqwiaG6o2Wu6NZJQ0u7Fg==",
"dependencies": {
"glob": "^7.1.3",
"graceful-fs": "^4.1.2",
"handlebars": "^4.1.2",
"object.assign": "^4.1.0",
"promise": "^8.0.2"
},
"engines": {
"node": ">=0.10"
32

}
},
"node_modules/finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
"integrity": "sha512-
aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOl
NjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
"dependencies": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"statuses": "~1.5.0",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"node_modules/function-bind": {
33

"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-
1.1.1.tgz",
"integrity": "sha512-
yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9
NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"node_modules/glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-
hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT
9RBKMGjnq6kMuyYwha6csxbiM1A==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
}
},
"node_modules/graceful-fs": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz",
"integrity": "sha512-
jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDu
LBGLQdvvRum/UiX6ECVIPvDXqdg=="
},
"node_modules/handlebars": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz",
"integrity": "sha512-
nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3
TIBP5ruzYGD7Hx/DaM9RmhroGPw==",
"dependencies": {
"neo-async": "^2.6.0",
"optimist": "^0.6.1",
"source-map": "^0.6.1"
},
34

"bin": {
"handlebars": "bin/handlebars"
},
"engines": {
"node": ">=0.4.7"
},
"optionalDependencies": {
"uglify-js": "^3.1.4"
}
},
"node_modules/has-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-
1.0.0.tgz",
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/http-errors": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
"integrity": "sha512-
uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqc
oFVI4lQJ5plg63TvGfRSDCRg==",
"dependencies": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.1",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-
v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQ
Wne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dependencies": {
35

"safer-buffer": ">= 2.1.2 < 3"


},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"node_modules/inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"node_modules/ipaddr.js": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
"integrity": "sha512-
M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU
3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/kareem": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz",
"integrity": "sha512-
6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdq
ZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
},
"node_modules/lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-
8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt
0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
36

},
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-
1.5.0.tgz",
"integrity": "sha512-
ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNC
StjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"node_modules/merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-
descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-
x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+Nkm
YmmRgP68mc70j2EbeTFRsrswaQeg==",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
37

}
},
"node_modules/mime-db": {
"version": "1.40.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
"integrity": "sha512-
jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzd
bmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.24",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-
2.1.24.tgz",
"integrity": "sha512-
WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZs
YpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
"dependencies": {
"mime-db": "1.40.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-
yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0H
Rot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/minimist": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8="
38

},
"node_modules/mongodb": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.7.tgz",
"integrity": "sha512-
2YdWrdf1PJgxcCrT1tWoL6nHuk6hCxhddAAaEh8QJL231ci4+P9FLyqopbTm
2Z2sAU6mhCri+wd9r1hOcHdoMw==",
"dependencies": {
"mongodb-core": "3.2.7",
"safe-buffer": "^5.1.2"
},
"engines": {
"node": ">=4"
}
},
"node_modules/mongodb-core": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-
3.2.7.tgz",
"integrity": "sha512-
WypKdLxFNPOH/Jy6i9z47IjG2wIldA54iDZBmHMINcgKOUcWJh8og+Wix7
6oGd7EyYkHJKssQ2FAOw5Su/n4XQ==",
"dependencies": {
"bson": "^1.1.1",
"require_optional": "^1.0.1",
"safe-buffer": "^5.1.2"
},
"optionalDependencies": {
"saslprep": "^1.0.0"
}
},
"node_modules/mongoose": {
"version": "5.6.6",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.6.6.tgz",
"integrity": "sha512-
5uecJSyl2TwbGM9vJteP4C54zsQL6qllq1qe/JPGO3oqIWcK/PnzCL91E0gfPH
5VVpvWGX+6PafNYmU3NK8S7w==",
"dependencies": {
"async": "2.6.2",
"bson": "~1.1.1",
"kareem": "2.3.0",
"mongodb": "3.2.7",
"mongodb-core": "3.2.7",
39

"mongoose-legacy-pluralize": "1.0.2",
"mpath": "0.6.0",
"mquery": "3.2.1",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"safe-buffer": "5.1.2",
"sift": "7.0.1",
"sliced": "1.0.1"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mongoose-legacy-pluralize": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-
/mongoose-legacy-pluralize-1.0.2.tgz",
"integrity": "sha512-
Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NW
KfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==",
"peerDependencies": {
"mongoose": "*"
}
},
"node_modules/mongoose/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-
sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKW
P0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/mpath": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.6.0.tgz",
"integrity": "sha512-
i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVS
W7GIXL/9hHWlT9haLbCXWOll3qw==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery": {
"version": "3.2.1",
40

"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.1.tgz",
"integrity": "sha512-
kY/K8QToZWTTocm0U+r8rqcJCp5PRl6e8tPmoDs5OeSO3DInZE2rAL6AYH
+V406JTo8305LdASOQcxRDqHojyw==",
"dependencies": {
"bluebird": "3.5.1",
"debug": "3.1.0",
"regexp-clone": "^1.0.0",
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery/node_modules/debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-
OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjc
E2VqQpDslf55723cKPUOGSmMY3g==",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"node_modules/negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
"integrity": "sha512-
hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF
574pFQI7mum2AUqDidoKqcTOw==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/neo-async": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
41

"integrity": "sha512-
iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZa
DpPjcOKiiXCPINZC1GczQ7iTq3Zw=="
},
"node_modules/object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"integrity": "sha512-
NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxh
uNguS2XG+GjkyMwOzsN5ZktImfhLA==",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/object.assign": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-
4.1.0.tgz",
"integrity": "sha512-
exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc
9VZrXf7DarreEwMpurG3dd+CNyW5w==",
"dependencies": {
"define-properties": "^1.1.2",
"function-bind": "^1.1.1",
"has-symbols": "^1.0.0",
"object-keys": "^1.0.11"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
"dependencies": {
"ee-first": "1.1.1"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/once": {
42

"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/optimist": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
"dependencies": {
"minimist": "~0.0.1",
"wordwrap": "~0.0.2"
}
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-
CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p6
3hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-
1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-
0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"node_modules/promise": {
"version": "8.0.3",
43

"resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz",
"integrity": "sha512-
HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV
+R3vHY4MixIuoMEd9Yq/XvsTPcjw==",
"dependencies": {
"asap": "~2.0.6"
}
},
"node_modules/proxy-addr": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
"integrity": "sha512-
t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdf
OwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
"dependencies": {
"forwarded": "~0.1.2",
"ipaddr.js": "1.9.0"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
"integrity": "sha512-
VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxF
mmX56+HZphIGtV0XeCirBtpDrTyQ==",
"engines": {
"node": ">=0.6"
}
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-
1.2.1.tgz",
"integrity": "sha512-
Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3cc
AveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
"engines": {
"node": ">= 0.6"
}
},
44

"node_modules/raw-body": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
"integrity": "sha512-
4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepX
s+EsQ9XJ8ipEDoiH70ySUJP3Q==",
"dependencies": {
"bytes": "3.1.0",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-
1.0.0.tgz",
"integrity": "sha512-
TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6q
mpET16cK14kkjbazl6+p0RRv0yw=="
},
"node_modules/require_optional": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require_optional/-/require_optional-
1.0.1.tgz",
"integrity": "sha512-
qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/ty
loNqJyN6kXSl3RyyM8Ll5D/sJP8g==",
"dependencies": {
"resolve-from": "^2.0.0",
"semver": "^5.1.0"
}
},
"node_modules/resolve-from": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-
2.0.0.tgz",
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=",
"engines": {
"node": ">=0.10.0"
45

}
},
"node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-
Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscS
mMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-
YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2AD
xGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-
/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9o
JLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"dependencies": {
"sparse-bitfield": "^3.0.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/semver": {
"version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-
Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQ
coSERyZ5sl3LDIOw0nAn/5DA==",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
46

"integrity": "sha512-
BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJ
CrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
"dependencies": {
"debug": "2.6.9",
"depd": "~1.1.2",
"destroy": "~1.0.4",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "~1.7.2",
"mime": "1.6.0",
"ms": "2.1.1",
"on-finished": "~2.3.0",
"range-parser": "~1.2.1",
"statuses": "~1.5.0"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/send/node_modules/ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-
tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF
8hDVesS/FpnYaD/kOWhYQvyg=="
},
"node_modules/serve-static": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
"integrity": "sha512-
JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MO
fFnpFntl7ecpZs+3mW+XbQZu9QCg==",
"dependencies": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
"send": "0.17.1"
},
"engines": {
"node": ">= 0.8.0"
47

}
},
"node_modules/setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-
1.1.1.tgz",
"integrity": "sha512-
JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfD
w7OaMYwEbHMOxEZ1lqVRYP2OAw=="
},
"node_modules/sift": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz",
"integrity": "sha512-
oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWi
ak20tzZlSE1H7RB30SX/1j/YYT7g=="
},
"node_modules/sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-
UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1
Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-
3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"dependencies": {
"memory-pager": "^1.0.2"
}
},
"node_modules/statuses": {
48

"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-
yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxok
p0vcYnvteJln5FNQDRrxj3YcbVw==",
"engines": {
"node": ">=0.6"
}
},
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-
TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnl
FPW4ky9Q+iA+ma9BGm06XQBy8g==",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/uglify-js": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
"integrity": "sha512-
W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIH
LW7SfMFfiQuktQyFVCFHGUE0+yg==",
"optional": true,
"dependencies": {
"commander": "~2.20.0",
"source-map": "~0.6.1"
},
"bin": {
49

"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}
50

}
}
Package.json
{
"name": "url-shortener",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "node app.js",
"dev": "nodemon app.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"express-handlebars": "^3.1.0",
"mongoose": "^5.6.6"
}
}
51

CHAPTER-8

EXECUTION STEPS AND SCREEN SHOTS

1. Open visual studio code ->File ->Open Folder ->Select URL link
shortener file folder and open.

2.Select Terminal ->New Terminal ->PowerShell Window open

3.Type the following command on power shell window to connecting


MongoDB database
52

Node app.js
4.Now MongoDB connection was successful

5.Open chrome browser ->Type our URL link shortener server address to
open URL link shortener website.
http://localhost:3000

6.copy any URL and gives the input of URL website and submit the URL. For
example Nodejs installation website URL.
53

7.Now copy the shortened URL and paste to open the website are same.
54

CHAPTER-9

REFERENCES

1. Neumann, J. Barnickel, U. Meyer, "Security and privacy implications


of URL shortening services", Proceedings of the Workshop on Web 2.0
Security and Privacy, 2010
2. Wang, S. B. Navathe, L. Liu, D. Irani, A.Tamersoy, C. Pu, "Click traffic
analysis of short URL spam on twitter", Collaborative Computing:
Networking Applications and Work sharing Collaborate-com), pp. 250-
259, 2013.
3. "We want ‘em shorter", Meta Filter, 2001
4. "URL Shortening: Hashes In Practice", Coding Horror.
5. Altamura, F. Esposito, D. Malerba, "Transforming paper documents
into XML format with WISDOM++", IJDAR, vol. 4, no. 1, pp. 2-17,
2001.
6. Alonso, F. Casati, H. Kuno, V. Machiraju, "Web Services: Concepts
Architectures and Applications" in , Springer, 2004.
7. Mazinanian, N.Tsantalis, A. Mesbah, " Discovering Refactoring
Opportunities in Cascading Style Sheets ", Proceedings of the 22nd
ACM SIGSOFT International Symposium on Foundations of Software
Engineering (FSE), pp. 496-506, 2014.
8. Fard, A. Mesbah, "Jsnose: Detecting java script code smells", Source
Code Analysis and Manipulation (SCAM) 2013 IEEE 13th
International Working Conference on, pp. 116-125, 2013.

9. R. Dhamija, J. D. Tygar and M. Hearst, “Why phishing works, "in


proceedings of the SIGCHI conference on Human Factors in computing
systems. ACM, 2006,pp.581-590.
55

10.D.K McGrath and M. Gupta , “Behind phishing : An examination of


phisher mode operand .” LEET, Vol.8p.4, 2008.

11.M.Alsharnouby, F. Alaca, and S. Chiasson, “Why phishing still works


: User strategies for combating phishing attacks,” International Journal
of Human-Computer Studies, Vol. 82, pp. 69-82, 2015.

12.Veri form, “VERIFORM-Keep Your Brand Safe,


”https://WWW.veriform.com/.
56

CHAPTER-10

CONCLUSION

We have identified and examined how URL shortening services may


introduce security and privacy risks. According to our analysis, none of the
currently most popular URL shortening service exhibits malicious behavior. We
show, however, that many of these shortening services are well-prepared for user
tracking. Also, we show that by enumerating shortening services a lot of sensitive
or private information can be found and several shortening services do leak
submitted URLs to search engines. Future Work may include similar analysis of
one click image hosting services or one click hosting in general. A monitoring
service for uses could be established, to verify the continuous performance of
uses regarding availability and spam detection. An extended version of this paper
will be made available that contains all lists generated in our experiments.

You might also like