URL Sortening Application using Nest.js and MongoDB
$ yarn install
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
POST http://localhost:3000/auth/signup
{
"name": "Imrul Kais Khan",
"email": "[email protected]",
"password": "abc321!"
}
GET http://localhost:3000/auth/login
{
"email": "[email protected]",
"password": "abc321!"
}
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.)
POST http://localhost:3000/custom-shortner
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV.....
{
"longUrl": "https://bikroy.com/",
"shortId": "my-short-id"
}
GET http://localhost:3000/analytics
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV.....
Also POSTMAN Collection
is included inside the postman
folder.
This is an MIT-licensed open source project.
- Author - Imrul Kais Khan
Nest is MIT licensed.