A full-stack mini project for managing users with Create, Read, Update, and Delete operations.
- Frontend: Vue 3 + Vite + Tailwind CSS + Axios
- Backend: Express 5 + PostgreSQL + Node.js
- Node.js (v20.19+ or v22.12+)
- PostgreSQL
Create a PostgreSQL database and run:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL
);cd backend
npm installCreate a .env file:
DB_USER=postgres
DB_HOST=localhost
DB_NAME=your_database_name
DB_PASSWORD=your_password
DB_PORT=5432
PORT=3000
Start the server:
node server.jsThe backend runs at the port specified in your .env file (default: 3000).
cd frontend
npm install
npm run devThe frontend runs at http://localhost:5173 (Default).
| Method | Endpoint | Description |
|---|---|---|
| POST | /adduser |
Create a new user |
| GET | /getusers |
Get all users |
| PATCH | /updateuser/:id |
Update a user |
| DELETE | /deleteuser/:id |
Delete a user |