Coder Social home page Coder Social logo

aryanranderiya / urlshortener Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 8.57 MB

Created a Website using the MERN Stack (MongoDB, Express.js, React and Node.js) to generate custom or randomised short URLs that redirect to the long URL while facilitating Expiration for each shortened link.

Home Page: https://links.aryanranderiya.com

JavaScript 8.21% HTML 3.33% CSS 88.47%
aryan linkshortener linkshorteners mern mern-stack mern-stack-development url-shortener urlshortener website randeriya

urlshortener's Introduction

URL Shortener

  • Website that can convert any long link and generate a shorter link that redirects to it

Features

  • Dynamic shorter link Creation
  • Custom short link by the user
  • Auto generate randomly generated links based on a length
  • Choose an expiration date for each link

Technologies Used

  • Frontend:

    • React.js
    • NextUI
  • Backend:

    • Node.js
    • Express.js
    • MongoDB
  • Deploment

    • Vercel
    • MongoDB Atlas

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js and npm installed on your machine.
  • MongoDB installed locally or accessible through a remote server.

Getting Started

  1. Clone the repository:

    git clone https://github.com/aryanranderiya/URLShortener.git
    
    cd URLShortener
    

  2. Install Dependencies

    Tip: Create 2 Terminals for ease of use

  • Install Dependencies in Backend

    cd Backend
    
    npm i
    
  • Install Dependencies in Frontend

    cd Frontend/react-frontend
    
    npm i
    

  1. Update Environment Variables
    • Rename '.env.template' to '.env'
    • Add the link to your MongoDB connection string and your desired port.
    MONGO_DB = ""
    PORT=3000
    

  1. Start Server

    After Navigating to URLShortener/Backend using cd Backend'

    cd api
    
    node index
    

    After Navigating to URLShortener/Frontend/react-frontend using cd Frontend/react-frontend'

    cd src
    
    npm start
    

Deployment

  • Make sure to build the React project before deploying the Server.
      npm run build
    
  • No need to Deploy the react frontend as the Backend will automatically serve the frontend from src/build
  • Replace all hardcoded URL's from the code

Happy coding!

urlshortener's People

Contributors

aryanranderiya avatar dependabot[bot] avatar

Watchers

 avatar

Forkers

7murat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.