Skip to content

kostaschikis/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

URL Shortener API ๐Ÿ”—

Made with Node.js, Express and MongoDB

How To Install

  1. Install the dependecies with npm install
  2. Go to config folder and modify the default.json file with your MongoURI and BaseURL (You can use localhost)
  3. node start

How To Use

POST api/url/shorten

To make a post request you can use Postman or if you are using VScode you can download the REST Client Extension for Visual Studio Code.

  • For VScode you can use the api.http file located at the requests folder and insert a long url. Example

MongoDB

  • If you have Docker installed you can pull a MongoDB image and connect the app to your database container.

    docker pull mongo:latest
    docker run -d -p 27017:27017 --name mongodb mongo

    Then, modify the default.json file like this:
    { "mongoURI": "mongodb://localhost:27017/urlshortener", "baseURL": "http://localhost:5000"}

  • Otherwise, you can use MongoDB Atlas or a local MongoDB

What I Learned

  • Node.js Concepts
  • Express Framework
  • MongoDB
  • Use Dependencies
  • How URL Shortener Services Work
  • Dockerized Database

About

A simple API to shorten long URLs ๐Ÿ”—

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published