The Exam Generator template is a powerful tool for educators and students alike, allowing you to generate a new exam PDF based on an uploaded PDF of a past exam. This template uses a web interface for file upload and displays the generated exam for download. It's perfect for creating practice exams or preparing for upcoming tests.
To begin using this template, simply click on Start with this Template on the Lazy platform. This will set up the template in your Lazy Builder interface, pre-populating the code so you can start customizing or testing right away.
No environment secrets setup is required for this template. All necessary libraries and dependencies are handled by Lazy, ensuring a seamless experience.
Once you're ready to see the Exam Generator in action, press the Test button. This will begin the deployment of your app and launch the Lazy CLI. The Lazy platform will handle the deployment process, so you won't need to worry about setting up your environment or installing any libraries.
If the template requires user input, you will be prompted to provide it through the Lazy CLI after pressing the Test button. Follow the prompts in the CLI to input any required information.
After deployment, Lazy will provide you with a dedicated server link to access the web interface of the Exam Generator. Here's how to use it:
If you wish to integrate the Exam Generator into another service or frontend, you may need to use the server link provided by Lazy. For example, you could embed the link in an educational platform or share it with students for easy access to the exam generation feature.
Here's a sample request you might make to the server to upload a PDF and generate a new exam:
POST /upload HTTP/1.1<br>
Host: [Your Lazy Server Link]<br>
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW<br>
------WebKitFormBoundary7MA4YWxkTrZu0gW<br>
Content-Disposition: form-data; name="file"; filename="past_exam.pdf"<br>
Content-Type: application/pdf<br>
<br>
[PDF data]<br>
------WebKitFormBoundary7MA4YWxkTrZu0gW--<br>
And here's a sample response you might receive:
HTTP/1.1 200 OK<br>
Content-Type: application/json<br>
<br>
{<br>
"link": "https://[Your Lazy Server Link]/download/generated_exam.pdf"<br>
}
Remember, the actual server link and the endpoints will be provided by Lazy after you press the Test button.