Skip to content

juansegnana/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL-Shortener

Simple URL Shortener using Express and MongoDB.

Initial settings

Dependencies

  • express
  • moongose
  • ejs
  • shortid
npm install express mongoose ejs shortid

Development Dependencies

  • nodemon
npm install nodemon -D

Scripts

"scripts": {
    "dev": "nodemon server.js"
},

Description

  • We use ejs to simplify html render with variables.
  • Each time a user "post" at /shortUrls, Express will catch the fullUrl parameter, and then send it to the MongoDB.
  • In the creation process, it will create a random short id (with shortid dependency) and save it in the cloud.
  • Each time a user "get" at /, the user will recieve a list with all the urls shortered. Ejs helps with the html.
  • Each time a user "get" at /:shortUrl (enters to a url shortered), the "clicks" counter will increment by 1.

About

Simple URL Shortener using Express and MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published