Skip to content

URL shortener made in Node.js with the ExpressJS framework and MongoDB Atlas Cloud Service.

License

Notifications You must be signed in to change notification settings

diegossl/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL shortener

The URL Shortener is a tool to transform web page links into a smaller format than the original, facilitating sharing on the internet.

Setup

To execute the project, it will be necessary to install the dependencies by typing the following command in the terminal:

npm install

Then, create a file called .env and copy to the contents of the file .env.exemple, which already exists in the project and enter your credentials.

Credentials can be obtained from the following website:

https://www.mongodb.com

Finally, type the following command in the terminal to start the server:

npm start

The system is now ready to be used via the route:

http://localhost:3000/url

Just send the link you want to shorten for this route and a compressed link will be returned.

Example of data entry:

A JSON object containing the original URL that will be shortened.

{
  "url": "https://andrebona.com.br/por-que-o-dolar-se-tornou-a-principal-moeda-no-mercado-internacional/"
}

Example output:

A new shortened link.

{
  "urlShortened": "http://127.0.0.1:3000/1593223191130"
}

License

MIT

About

URL shortener made in Node.js with the ExpressJS framework and MongoDB Atlas Cloud Service.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published