This is a full-stack web app that generates a file that contains 2MB of random objects (alphabets, integers, real numbers, and alphanumerics). It also logs the count of the occurrence of each type of random object.
The project contains both the server and the client apps. The server scripts are all placed in the server folder whereas the client folder contains the client-facing codes.
- Clone this repository.
- Run
npm installin the root directory to install the dependencies for the server app. - Navigate to the
clientfolder and runnpm installonce more to install the dependencies for the client app. - In the root directory, run
npm startto start the server app. - On another terminal, navigate to the
clientfolder and runnpm startto start the client app.
Server App
- Node.js
- Express.js
Client App
- React
- React-Bootstrap
- The download link to the file that contains the random objects, due to same-origin-policy, couldn't initiate the browser download automatically. This is because the underlying implementation uses an
<a href>tag to point to the actual file generated on the server. - The size of the generated file is only an approximate of 2MB (2 * 1024 * 1024 bytes) for performance consideration.
- The algorithm that generates the random objects assumes a max length of 15 digits for numerics/real numbers and 20 digits for alphabets and alphanumerics.