API Shortly is the backend service that powers the Shortly URL shortener application. This repository contains the source code for the API, which handles URL shortening, user management, and other related functionalities.
API Shortly serves as the backend infrastructure for the Shortly URL shortener application. It is built using Node.js and Express, providing a robust and scalable foundation for the frontend application.
API Shortly offers the following key features:
- URL shortening service: Convert long URLs to short, easy-to-share links.
- User authentication system: Allows users to register, log in, and manage their shortened URLs.
- Analytics tracking: Provides insights into the performance of each shortened URL (clicks).
To run API Shortly on your local machine or server, follow these steps:
-
You need to have PostgreSQL installed on your machine, if so you need to create a database called
shortly
and run the dump.sql code "inside" this shortly database -
Clone this repository:
git clone https://github.com/DarlanSchwartz/API-Shortly.git
- Navigate to the project directory:
cd API-Shortly
- Install the required dependencies:
npm install
-
Configure the environment variables. You can use the provided
.env.example
file as a template. -
Start the server:
npm run dev
or
API Shortly should now be up and running on the specified port, and it's ready to serve requests from the Shortly frontend application.
API Shortly is designed to be used in conjunction with the Shortly frontend application. It handles API requests related to URL shortening, user authentication, analytics, and more.
Ensure that the Shortly frontend application is correctly configured to communicate with this API. Once both components are set up, users can start using the Shortly application seamlessly.