TinyApp is a full stack web application built with Node and Express that allows users to shorten long URLs (à la bit.ly). In essence, a URL Shortener is a service that takes a regular URL and transforms it into an encoded version, which redirects back to the original URL.
- Node.js
- Express
- EJS
- bcryptjs
- cookie-session
- Install all dependencies (using the
npm install
command). - Run the development web server using the
node express_server.js
command.
The editing page of a short URL will present the following metrics:
- Number of total visit
- Number os visits by unique users
- Log of all the visits received, containing when and who made it
- If a logged user visited the URL, their ID will be listed
- If the user is unknow, their IP is listed instead
TinyApp implements a RESTful API following the routing conventions:
- Retrieves the collection of URLs to the logged in user.
- Renders a representation of the collection
- Creates a new URL using the provided request body
- Redirects to a route where the new URL can be viewed
- Retrieves the URL with the specified id
- Renders a representation of the URL
- Responds with a 404 - Not Found error if the URL doesn't exist
- Updates a specific URL using the provided request body
- Redirects to a route where the updated URL can be viewed
- Responds with a 404 - Not Found error if the User doesn't exist
- Deletes a specific URL
- Redirect to the index of the collection
- Responds with a 404 - Not Found error if the User doesn't exist