- JavaScript 100%
| config | ||
| models | ||
| requests | ||
| routes | ||
| .gitignore | ||
| index.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
NodeJS URL Shortener
This is a basic NodeJs url shortener.
So you don't have to keep using bitly
Also because Branding...
📝 Table of Contents
- About
- License
- Getting Started
- Deployment
- Usage
- Built Using
- TODO
- Contributing
- Authors
- Acknowledgments
🧐 About
This project was built from a Traversy Media turtorial on youtube. It is a part of my portfolio but you are free to use it for you purposes as well.
License
This project is MIT Licensed.
🏁 Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
Here's what you need to get started
Runtime
Nodejs V8+
Database
MongoDB Atlas
Installing
A step by step series of examples that tell you how to get a development env running.
Create a database on MongoDB Atlas
Create a connection string
Clone the repository
git clone https://github.com/RileySeaburg/url-shortener.git
Navigate to cloned project
cd url-shortener
Replace baseUrl with your localhost url & mongoUri with your mongoDB connection string.
vi config/default.json
Save file
:wq
Run Server
npm start
🔧 Running the tests
This is just the backend so the best bet is to test with postman.
Test the urlshortener
Call the api and enter your url to shorten.
POST http://baseUrl/api/url/shorten
Content-Type: application/json
{
"longUrl": "insert link here."
}
Test New Url
After you create the url it should be available to test.
Navigate to "shortUrl"
⛏️ Built Using
✍️ Authors
- @rileyseaburg - Project Author
See also the list of contributors who participated in this project.
🎉 Acknowledgements
- Original Code Traversy Media