To clone and run this project, you'll need Git, node v14.20.0 or higher + yarn v1.22.15 or higher installed on your computer. From your command line:
#Clone this repository
$ git clone https://github.com/RenanTRS/url-shortener-dio
#Go into the repository
$ cd url-shortener-dio
#Install dependencies
$ yarn
#or
$ npm i
#Run
$ yarn dev
#or
$ npm run dev
#Build
$ yarn build
#or
$ npm run build
#Run build
$ yarn start
#or
$ npm run start
BASE_URL: your_baseurl_here
MONGO_URI: your_stringconnection_database_here
POST:
http://<yourbaseurl>/shorten
Request (body):
{
"originURL": "https://www.npmjs.com"
}
Response:
{
"_id": "62ca10afd21ae74c7ff28cc0",
"hash": "GkSYmaFoU",
"originURL": "https://www.npmjs.com",
"shortURL": "http://localhost:3333/GkSYmaFoU",
"__v": 0
}
GET:
http://<yourbaseurl>/hash-generated
- (shortURL)
- Email me - renantrsouza@gmail.com
- Connect with me on LinkedIn
This project is licensed under the MIT License - see the LICENSE file for details.