A simple url shortener site.
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.
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.
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.