npm run install-allnpm run devThis starts both:
- Backend server on
http://localhost:5000 - Frontend app on
http://localhost:3000
Navigate to http://localhost:3000 and start shortening URLs!
- No database URL needed! The app uses SQLite by default
- Database file is automatically created at
server/data/linkx.db - No external database installation required
- Optional: Create
server/.envif you want to customize the port - Default port is 5000 (backend) and 3000 (frontend)
- See
server/.env.examplefor configuration options
Port already in use?
- Change
PORTinserver/.envor kill the process using port 5000
Dependencies not installing?
- Make sure you have Node.js v14+ installed
- Try deleting
node_modulesfolders and runningnpm run install-allagain
Database errors?
- Make sure the
server/data/directory is writable - Check that SQLite3 installed correctly:
npm list sqlite3in server directory
- Paste a long URL
- (Optional) Click "Custom Code" to set your own short code
- (Optional) Click "Expire/Limit" to set an expiry date or max clicks
- Click "Shorten URL"
- Copy and share your shortened link!
Short URLs work like: http://localhost:5000/your-code