A React + Express demo application for processing file uploads. The frontend form contains a basic file input.
Upload results are rendered below the form. The backend API receives the file at POST /uploads and saves it locally to an uploads folder.
To demonstrate invalid uploads, PDF and TXT file types are rejected. A Cypress test suite is included to demonstrate fixture file usage.
- Node 17 (or greater)
- Clone project:
git@github.com:murjax/basic-file-uploader.git - Navigate into folder
cd basic-file-uploader - Install Cypress dependencies from root folder
npm install - Open at least three shells.
- Navigate into the server and install dependencies.
cd server; npm install - Navigate into the client and install dependencies.
cd client; npm install - Start the client (in client folder).
npm start - Start the server (in server folder).
node index.js - Run the tests (in root folder).
npm run cypress:open