Skip to content

Rheaazarraga/tinyapp

Repository files navigation

TinyApp Project


TinyApp is a full stack web application built with Node and Express that allows users to shorten long URLs (à la bit.ly).

Purpose


This project by Rhea Azarraga is created as part of the Lighthouse Labs curriculum. It is not intended for professional use.

Final Product


registertiny

logintiny

myurlstiny

nourlstiny

oopstiny

Dependencies


  • Node.js
  • Express
  • EJS
  • bcrypt
  • body-parser
  • cookie-session

Dev Dependencies


  • Mocha
  • Chai
  • Nodemon

Getting Started


  • Install all dependencies (using the npm install command).
  • Run the development web server using the node express_server.js command.

File Structure & Description


Server Directory

  • 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.

Views Directory

  • 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

Test Directory

  • Contains TDD unit tests for helpers functions

About

A full stack web application that allows users to register, login, and modify long URLs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published