A simple URL shortener service, written in Go & Next.js
GPL-3.0 License
This is a simple URL shortener project, made for learning purposes.
It is similar to Bit.ly or TinyURL, and allows users to input a long URL and receive a shortened version of it. This makes sharing links easier and helps in tracking and managing URLs.
View the live application here .
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them:
For the server:
For the client:
A step by step series of examples that tell you how to get a development env running:
Clone the repository:
git clone github.com/nitzanpap/url-shortener
Change into the project directory:
cd url-shortener
Go
extension to install the necessary tools and dependencies.Change into the server directory:
cd server
Create a .env
file in the server directory:
touch .env
Make sure to populate the .env
file according to the .env.example
file.
Run the server via make:
For development, run with live reload:
make run/live
Or build and run the server:
Manually:
make build && make run
Via Docker:
docker compose up
Change into the client directory:
cd client
Create a .env.local
file in the client directory:
touch .env.local
Make sure to populate the .env.local
file according to the .env.example
file.
Install the dependencies:
npm install
Run the development server:
For development:
npm run dev
For production:
npm run build && npm start
If you are using VS Code, you can use the launch.json
configurations to debug the server and client code.
I am deploying the server to render.com and the client to Vercel. You can deploy the server and client to any platform of your choice.