TinyApp is a full stack web application built with Node and Express that allows users to shorten long URLs (à la bit.ly).
This project by Rhea Azarraga is created as part of the Lighthouse Labs curriculum. It is not intended for professional use.
- Node.js
- Express
- EJS
- bcrypt
- body-parser
- cookie-session
- Mocha
- Chai
- Nodemon
- Install all dependencies (using the
npm install
command). - Run the development web server using the
node express_server.js
command.
- Contains all routing to endpoints with a path of /urls, user entry point (register, log in & log out) *Requires all dependencies needed for the project.
- Sets up EJS as the app's view engine.
- Contains various modules serving as helper functions for the project.
- Helper functions include:
- generateRandomString(): generates a random alphanumeric string for a users short URL and userID.
- getUserByEmail(email, users): Checks if email exists is in the userDatabase and returns that users ID if it exists.
- urlsForUser(urlDatabase, userID): returns an array of objects containing a list of the user's long URL's and corresponding short URL's.
- Site header template
- Collection of URL's EJS template
- Update an existing URL EJS template
- Create a new URL EJS template
- Registration EJS template
- Log In EJS template
- Error EJS template
- Contains TDD unit tests for helpers functions