A form application with file upload support
- Frontend: HTML/CSS/JavaScript
- Backend: Node.js + Express
- Database: SQLite
- File Upload: Multer
- Node.js (v14 or higher)
- npm
- Install dependencies:
npm install- Start the server:
npm start- Open browser and navigate to:
http://localhost:3000
- The server will create:
database.db: SQLite database fileuploads/: Directory for uploaded files
CREATE TABLE submissions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT NOT NULL,
message TEXT NOT NULL,
attachment_filename TEXT,
attachment_path TEXT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
)- Name: Required
- Email: Required, must be valid email format
- Message: Required, minimum 20 characters
- Attachment: Optional, max 5MB, only PDF/JPG/PNG
Press Ctrl+C in the terminal where the server is running.