A full stack JavaScript application that allows users to upload files and retrieve their metadata.
- Upload files through a web interface
- Get file metadata including name, type, and size
- RESTful API endpoint for file analysis
- CORS enabled for cross-origin requests
- Backend: Node.js, Express.js
- File Upload: Multer
- Frontend: HTML, CSS, JavaScript (Vanilla)
- Clone or download the project files
- Navigate to the project directory
- Install dependencies:
npm install
-
Start the server:
npm startOr for development with auto-restart:
npm run dev -
Open your browser and go to
http://localhost:3000 -
Select a file and click "Upload" to see its metadata
Upload a file and get its metadata.
Request:
- Method: POST
- Content-Type: multipart/form-data
- Body:
upfile(file)
Response:
{
"name": "example.txt",
"type": "text/plain",
"size": 1234
}file-metadata-microservice/
├── server.js # Main server file
├── package.json # Dependencies and scripts
├── public/
│ └── index.html # Frontend interface
└── README.md # This file
MIT License