Skip to content

Commit

Permalink
Add expose URL's and other info's
Browse files Browse the repository at this point in the history
  • Loading branch information
tushar821999 authored Jun 1, 2021
1 parent 2e3aa07 commit 903a7e0
Showing 1 changed file with 61 additions and 21 deletions.
82 changes: 61 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,67 @@
# Link-Trim
A minimal web app for URL shortner service
# Link-Trim Web Service API 🚀

# Dependencies
- Express : npm install express
- Mongoose : npm install mongoose
- Validator : npm install validator
<img src="https://cdn.discordapp.com/attachments/848998092518064153/849281320525758494/Logo---WeFoss.jpg" height=250px width=250px>

# Http Verbs
- CREATE : POST
- READ : GET
- UPDATE : PUT / PATCH
- DELETE : DELETE
<img src="https://img.shields.io/npm/v/express.svg"> <img src="https://img.shields.io/badge/Node-JS-brightgreen"> <img src="https://img.shields.io/badge/Express-JS-brightgreen"> <img src="https://img.shields.io/badge/Mongo-DB-brightgreen"> <img src="https://img.shields.io/badge/Validator-JS-brightgreen">

# Run Config
- npm run start : to start listening the services
- npm run dev : to start in dev mode
<img src="https://img.shields.io/twitter/follow/fosswe?style=social"> <img src="https://img.shields.io/github/forks/we-foss/link-trim?style=social"> <img src="https://img.shields.io/github/stars/we-foss/link-trim?style=social">

# Expose URL ➰
```POST : .../url```
```
// Request Body
{
"inputURL" : "https://somerandomurl.com/this-is-my-first-api-call-which-i-need-to-explain",
"inputText" : "api-call"
}
# MongoDB Database Name
- DNS-map
// Response Body
# Post Call Body
{
"inputURL" : <input_url>,
"inputText" : <input_text>,
"outputText" : <output_text>
}
"_id": "60b65180e14f372af0e298bb",
"inputURL": "https://somerandomurl.com/this-is-my-first-api-call-which-i-need-to-explain",
"inputText": "api-call",
"outputText": "localhost:3000/api-call",
"__v": 0
}
```
```GET : .../```
```
// Response Body (returns all the url stored in the database)
[
{
"_id": "60b65180e14f372af0e298bb",
"inputURL": "https://somerandomurl.com/this-is-my-first-api-call-which-i-need-to-explain",
"inputText": "api-call",
"outputText": "localhost:3000/api-call",
"__v": 0
}
]
```
```GET : .../api-call```
```
// Response Body when input is append to url
[
{
"_id": "60b65180e14f372af0e298bb",
"inputURL": "https://somerandomurl.com/this-is-my-first-api-call-which-i-need-to-explain",
"inputText": "api-call",
"outputText": "localhost:3000/api-call",
"__v": 0
}
]
```


# Run Config
- <img src="https://img.shields.io/badge/npm%20run%20start-Normal%20Mode%20Run-orange">
- <img src="https://img.shields.io/badge/npm%20run%20dev-Nodemon%20Dev%20Mode-orange">

# Team Members 🥇
- Tushar Verma
- Kunal Agarwal
- Muqeet Zama Khan
- Varun
- Bilalumrani
- Fawaz

0 comments on commit 903a7e0

Please sign in to comment.