Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aksh-bansal-dev/urlshortener
Shortens URLs
https://github.com/aksh-bansal-dev/urlshortener
Last synced: 25 days ago
JSON representation
Shortens URLs
- Host: GitHub
- URL: https://github.com/aksh-bansal-dev/urlshortener
- Owner: Aksh-Bansal-dev
- Created: 2021-03-13T11:03:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-06T16:40:36.000Z (almost 4 years ago)
- Last Synced: 2024-11-20T11:05:00.733Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# URL Shortener
Shortens URLs.
## Technologies used
- Nextjs
- Nodejs
- Postgres
- Docker## How to use(manual)
- Start postgres server using docker
(persist data)```
docker run -p 5432:5432 --name postgresserver -d \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=shorturl \
-v /var/lib/postgresql/data \
postgres
```OR
- run postgres server
(non-persist data)```
docker run -p 5432:5432 --name postgresserver -d \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=shorturl \
postgres
```- Create table in postgres server
```
docker exec -it postgresserver psql -d shorturl -U postgres
``````
CREATE TABLE urls ( ID SERIAL PRIMARY KEY, URL VARCHAR(100));
```- Start backend server using `npm run dev`.
- Start frontend server using `npm run dev`.
- Visit [website](http://localhost:3000).## How to use (Docker edition)
[Docker setup](DOCKER_SETUP.md)