https://github.com/phantomknight287/url-shortner
URL shortener built using Nextjs and Postgresql
https://github.com/phantomknight287/url-shortner
neondb nextjs postgresql prisma
Last synced: 3 months ago
JSON representation
URL shortener built using Nextjs and Postgresql
- Host: GitHub
- URL: https://github.com/phantomknight287/url-shortner
- Owner: PhantomKnight287
- Created: 2022-09-26T18:07:42.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-14T06:05:34.000Z (almost 3 years ago)
- Last Synced: 2026-04-11T07:42:29.118Z (3 months ago)
- Topics: neondb, nextjs, postgresql, prisma
- Language: TypeScript
- Homepage: https://shortly.cantcode.fyi/
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
URL Shortener
A simple URL shortener made with Nextjs and PostgreSQL
### Usage
Go [here](https://shortly.cantcode.fyi) to use the app.
## Setting Up Locally
### Prerequisites
- [Node.js](https://nodejs.org/en/)
- [PostgreSQL](https://www.postgresql.org/)(you can use neondb if you want to host it for free)
### Setting up the project
1. Clone the repository
```bash
git clone https://github.com/phantomknight287/url-shortner.git
```
2. Install dependencies
```bash
pnpm install
```
3. Create a .env file in the root directory and add the following
```bash
DATABASE_URL=postgres://username:password@localhost:5432/database
```
4. Push the database schema to your database
```bash
npx prisma db push
```
5. Run the development server
```bash
pnpm dev
```
6. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.