Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/helios2003/swiftshort
A URL Shortener written in Node.js
https://github.com/helios2003/swiftshort
docker mongodb nodejs redis url-shortener
Last synced: 7 days ago
JSON representation
A URL Shortener written in Node.js
- Host: GitHub
- URL: https://github.com/helios2003/swiftshort
- Owner: helios2003
- Created: 2023-11-16T19:07:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-27T13:46:17.000Z (11 months ago)
- Last Synced: 2024-01-28T09:29:04.693Z (11 months ago)
- Topics: docker, mongodb, nodejs, redis, url-shortener
- Language: JavaScript
- Homepage: https://ss-xd85.onrender.com
- Size: 330 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SwiftShort
SwiftShort is a URL shortener. I made it primarily for learning basic system design and backend development. It is written in Node.js.## Instructions to Set up the Repository
1. Clone the repository
2. Go the frontend directory and run `index.html` in your browser.
3. Go the backend directory and run `npm install`.
4. Change the name of ``.env.example`` to ``.env`` and fill the environment variables.
5. Start a redis server on port 6379 suing the command `redis-server`.
6. Run `npm start` to start the server.
7. Go to `localhost:3000` in your browser to use the shortener.## Using Docker to Set up the Repository
1. Clone the repository.
2. Change the name of ``.env.example`` to ``.env`` and fill the environment variables.
3. Run ``docker-compose build`` to build the containers.
4. Run ``docker-compose up -d`` to start the containers in detached mode.## Using the Shortener
1. In ``index.html`` insert the URL you want to shorten in the input field.
3. Paste the shortened URL in your browser to be redirected to the original URL.## System Design
![System Design](assets/system_design.png)