https://github.com/alexbsoft/redirector
simple Node.js application written in TypeScript that redirects incoming requests to a predefined URL, preserving all query parameters.
https://github.com/alexbsoft/redirector
express nodejs redirect typescript
Last synced: about 1 month ago
JSON representation
simple Node.js application written in TypeScript that redirects incoming requests to a predefined URL, preserving all query parameters.
- Host: GitHub
- URL: https://github.com/alexbsoft/redirector
- Owner: AlexBSoft
- Created: 2024-11-28T09:12:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-28T09:18:46.000Z (over 1 year ago)
- Last Synced: 2025-10-24T13:51:27.458Z (8 months ago)
- Topics: express, nodejs, redirect, typescript
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Redirector
Redirector is a simple Node.js application written in TypeScript that redirects incoming requests to a predefined URL, preserving all query parameters.
## Features
- Redirects all requests to a specified URL.
- Preserves query parameters during the redirect.
- Configurable with environment variables.
## Prerequisites
- [Node.js](https://nodejs.org/) (Version 12 or higher)
- [npm](https://www.npmjs.com/) (Node package manager)
## Installation
Clone the repository or download the files.
```bash
git clone
cd redirector
```
Install the required dependencies:
```bash
npm install
```
Set the `REDIRECT_URL` environment variable to the URL you want to redirect to
## Usage
Run the application with:
```bash
npm start
```
The app will start serving on http://localhost:8080.
## Example
If you access the following URL in your browser:
http://localhost:8080/?state=test&code=123
It will redirect you to:
http://localhost:3000/auth/login?state=test&code=123