A reworked URL Shortening API backend (based on this project). This is 1/2 of a URL shortening full stack app, the other half being a react front-end with auth. I wanted to rebuild this project becuase the first version I made in an afternoon and has some very glaring flaws. I wanted to put more of an emphasis on security and get more experience designing perfomant, scalable, and efficient code.
Path | HTTP METHOD | INFO |
---|---|---|
/ | GET | main route returns json welcome message |
/ | POST | adds a URL to the DB either using a specified or random slug |
/:slug | GET | redirects to the URL associated with slug |
/:slug | POST | updates the URL associated with slug with newSlug value |
/:slug/info | GET | returns full DB object with info about url, including count, date created, etc. |
/:slug/delete | POST | deletes db db object and returns status 200 to confirm |
- Add edit route
- Add delete route
- Dockerize
- Locally
- Remote
- Travis
- Add Tests to each route
- / GET
- / POST
- valid url no slug
- valid url valid slug
- valid url invalid slug
- invalid url
- /:slug GET
- valid slug
- invalid slug
- /:slug POST
- valid slug
- invalid slug
- /:slug/info GET
- valid slug
- invalid slug
- /:slug/delete
- valid slug
- invalid slug
- Write error handling middleware