- express: framework Node.js is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
- nodemon: utility that will monitor for any changes in your source and automatically restart your server.
- dotenv: zero-dependency module that loads environment variables from a .env file into process.env.
- readline-sync:
- openai: OpenAI API library for Node.js projects. This library provides convenient access to the OpenAI API from applications written in server-side JavaScript.
npm install dotenv nodemon openai readline-sync
.env file
OPENAI_API_KEY=sk-brHeh...A39v5iXsM2
export OPENAI_API_KEY='sk-brHeh...A39v5iXsM2'
npm start