Skip to content

imrulkk89/URL_Shortner

Repository files navigation

Description

URL Sortening Application using Nest.js and MongoDB

Installation

$ yarn install

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

APIs

SignUp

POST http://localhost:3000/auth/signup
{
    "name": "Imrul Kais Khan",
    "email": "[email protected]",
    "password": "abc321!"
}

Login

GET http://localhost:3000/auth/login

{
    "email": "[email protected]",
    "password": "abc321!"
}

Shortening URL

POST http://localhost:3000/url-shortner
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV.....
{
    "url": "https://www.udemy.com/"
}

Copy the url form the response and paste it in the browser. It will redirect to original page. (Need to keep application running in same machine.)

Custom Shortening

POST http://localhost:3000/custom-shortner
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV.....
{
    "longUrl": "https://bikroy.com/",
    "shortId": "my-short-id"
}

Get Analytics

GET http://localhost:3000/analytics
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV.....

Also POSTMAN Collection is included inside the postman folder.

Support

This is an MIT-licensed open source project.

Stay in touch

License

Nest is MIT licensed.

About

URL Shortner using NestJS Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published