Its a basic Node.js project that will generate alphabetical strings, real numbers, integers, and alphanumerics.
1. Install Node.Js
if not installed in your computer from this url: .https://nodejs.org/
2. Clone this repository from GitHub.
3. Goto project root folder and run the command npm init
in command terminal.
4. Run the command npm install express
in command terminal.
5. run command node app.js
.
Server is listening on port 6030
message will be shown in terminal.
-
GET
request to url: http://localhost:6030/pingresponse: Pong
-
GET
request to url: http://localhost:6030/generateresponse:
{ "downloadUrl": "localhost:6030/files/objects.txt" }
-
GET
request to url: http://localhost:6030/files/objects.txtGenerated
objects.txt
file will be downloaded. -
GET
request to url: http://localhost:6030/reportresponse:
{ "Alphabetical_Strings":60900, "Real_Numbers":50043, "Integers":49903, "Alphanumerics":39308 }
Counts will be different according to random object generation.