Giter VIP home page Giter VIP logo

url-shortener's Introduction

URL-SHORTENER APP

This is a mono-repo app for a url-shortening service. Backend is built with MongoDB (chosen for its easiness in setting up a connection via the variables in the .env file), front-end is built with create-react-app. It uses tailwind for styling/css .

To run the code, you need to download the repo via git clone. Once downloaded, set your MongoDB environment variables in the .env (create a .env file in the root of the backend directory) file (you'll need to set the variable names to DB_USER, DB_PASSWORD, DB_CLUSTER and DB_NAME). You can find the example of what you'll need in the db.js file located in backend/dbConfig directory of this repo.

To begin with, you also have to seed your DB. I've left a seeds.js file inside the backend directory so you can do this quickly. You can quickly seed your MongoDB collection by running node seeds.js from within the backend directory.

Once you have set up your environment variables, you'll need to install all the dependencies. The repo has been set up so you can do this in 3 commands -- first, run npm install at the root directory. Second, run npm run install-all to install all the dependencies in the backend & front end folders. And finally, now you can run both the client and server app by running npm run start-all from the root directory of the application. There is also a script to run the server on nodemone, just use npm run start-dev.

If you're running into any issues, make sure your current directory is not /frontend , or /backend.

Front-end was designed trying to replicate the structure of TinyURL .

TECH STACK

Node.JS ExpressJS MongoDB Tailwind ReactJS

RESOURCES

Resource 1 Resouce 2 Resource 3

url-shortener's People

Contributors

snlaight avatar

Watchers

 avatar

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.