The goal of this project is to make a GET request to a specified URL using assembly language and obtain the response in a text document, which is then displayed in the browser.
This project works with Movie Database.
The program is written in MASM and takes a URL link as input from the user. It uses the WinInet library to make a GET request to the specified URL and writes the response to a text document.
A Node.js server using Express.js is used to handle GET and POST requests to a specific route. The server accepts a URL input via a POST request and the assembly program is executed to make a GET request to the provided URL. The program is started and the URL is inserted using the search.bat script.
The search.bat
script performs the following tasks:
- Launches the program
- Waits for 3 seconds
- Inserts the URL into the program
- Runs the PowerShell script temp.ps1 to simulate user input
- Deletes the temp.ps1 file
The server reads the text document generated by the assembly program and returns its content as a response to GET requests.
The client-side is built using React and includes a form that sends a POST request to the server with the specified URL. After that, the client sends a GET request to the server to retrieve the response generated by the assembly program.
MASM Assembler Server: Node.js, Express.js Client: React.js, axios, router-dom
To run the project, execute the following commands:
yarn dev
for the clientnode index.js
for the server
Alternatively, run the start.bat
script which will start both the client and the server, and open the browser to http://localhost:5173/.
If you need a fully working project, you can unzip assembler-api-handler.zip and paste your api key into the env file.