- To create an app use command npm create vite@latest client --template vanilla
- Select Vanilla framework
- Select JavaScript variant
- Run the command npm init -y
- Run the command npm i cors dotenv express nodemon openai
- Visit OpenAI website (https://openai.com/api) and create an account
- Click on Your profile pic in the right top corner and click on View API keys
- Click on Create new secret key button and copy and paste your secret key in .env file that you created inside server folder with the key name as OPENAI_API_KEY
- Visit https://render.com/
- Create a new account using github
- Go to dashboard (https://dashboard.render.com/) and click on +New dropdown and select Web Service option
- Connect your repository uploaded to Github
- Add name and other details as you like
- Set root directory as server, build command as yarn and start command as npm run server
- Select Free instance type and click on Create
- Add environment variable in the deploy pipeline
- Use vercel to deploy client code