Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.02 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.02 KB

URL Shortener

A simple url shortener site.

Requirements


Setup

Backend

1. Change directory then install dependencies then initialize prisma

cd backend
npm install
npx prisma migrate dev --name init

2. Configure dotenv Copy and rename the example dotenv file to '.env', then configure the options accordingly.

Frontend

1. Change directory then install dependencies

cd frontend
npm install

2. Configure proxy for communicating with backend Configure the proxy in vite.config.js, match the port for '/api/' and '/s/' with backend's port.

Development

In development, first install the dependencies with npm install. Then, simply run npm run dev on the root directory, and it will start both backend's and frontend's dev script. Make sure to migrate prisma beforehand, by executing npx prisma migrate dev command in the backend directory.