A full stack web application written in TypeScript with a Node/Express Server along with React & MongoDB database (MERN). Users are able to paste long URL's into the form provided and are able to input a custom URL if they want to!. You are then provided with an easy to use, customizable short URL you can share with whoever you like.
If users registered in our site. They can also get more information about their short URL, including: when the URL was created, when it was last accessed and how many times it has been clicked.
Clone this repository
git clone https://github.com/surajkarki66/shortIT
-
Make sure you have Node.js installed on your local machine.
-
Install
yarn
using npm.npm install -g yarn
-
Install dependencies required by the backend server.
yarn install
-
Create a
.env
file in a project's root directory and set all the environment variables based on the provided.env.sample
example. -
Run the development server
yarn run dev
-
Backend server is up and running on http://localhost:5000/
-
After running the backend server, you only need to run the frontend.
-
Open up a new terminal window, and change the directory to
client
folder.cd client
-
Install dependencies required by the frontend app.
yarn install
-
Inside
src
directory there is a file with a nameconfig.ts
. Go inside that file and replace the second line of code with the code provided below.export const baseURL = "http://localhost:5000"
-
Run the development server
yarn start
-
Preview: http://localhost:3000
Happy Coding !!