Essay Generator

This is a simple web application that generates essays using the OpenAI API. It allows you to input a topic and select the desired length of the essay, and then it calls the OpenAI API to generate the essay.

Prerequisites

Before you can run this application, you'll need the following:

Getting Started

  1. Clone this repository to your local machine:

git clone https://github.com/Yuanjie58/essay-generator.git

2.Navigate to the project directory:

cd essay-generator

3.Install the project dependencies:

npm install

4.Create a .env file in the project root and add your OpenAI API key as an environment variable:

MY_SECRET:YOUR_OPENAI_API_KEY

Start the application:

node index.js

Open your web browser and navigate to http://localhost:3000 to access the essay generator.

How to Use

Fill out the form with the desired topic and select the essay length (short or long).

Click the "Generate Essay" button.

The generated essay will appear on the page along with the word count.

You can click the "Fullscreen" button to view the essay in fullscreen mode.

Contributing If you'd like to contribute to this project, please fork the repository and create a pull request with your changes. We welcome contributions!

License This project is licensed under the MIT License - see the LICENSE.md file for details.