-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e3aa07
commit 903a7e0
Showing
1 changed file
with
61 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |