by encodedcoder
Access Here: Link Shortner
This is a simple link shortener application built with TypeScript and Express. It allows users to create shortened links and retrieve the original URLs.
- Create shortened links
- Retrieve original URLs from shortened links
linksnip
├── src
│ ├── app.ts # Entry point of the application
│ ├── controllers # Contains the URL controllers
│ │ ├── index.ts
│ │ └── urlController.ts
│ ├── data # Contains data files
│ │ └── urls.json
│ ├── models # Contains data models
│ │ └── urlModel.ts
│ ├── routes # Defines application routes
│ │ └── index.ts
│ ├── types # Type definitions
│ │ └── index.ts
│ └── utils # Utility functions
│ └── generateShortCode.ts
├── public # Contains static files
│ ├── index.html
│ ├── scripts.js
│ └── styles.css
├── package.json # NPM package configuration
├── tsconfig.json # TypeScript configuration
└── README.md # Project documentation
- Clone the repository:
git clone https://github.com/encodedcoder/linksnip.git
- Navigate to the project directory:
cd linksnip
- Install the dependencies:
npm install
- Build the application:
npm run build
- Start the application:
npm start
- Use the following endpoints:
- POST /shorten: Create a shortened link.
- GET /:shortCode: Retrieve the original URL.
Feel free to submit issues or pull requests for improvements or bug fixes.