This project is a Next.js application created using create-next-app
. Powered by DALL·E 2, Chat GPT & Microsoft Azure.
- Node.js installed on your local machine
- An Azure account
- An OpenAI account
Follow these steps to get the project up and running:
Navigate to the project's root directory and run one of the following commands to install the necessary dependencies:
npm i
# or
yarn
# or
pnpm i
Then, install the dependencies for Azure Functions:
cd .\azure\ && npm i
# or
cd .\azure\ && yarn
# or
cd .\azure\ && pnpm i
Copy the .env.example file to a new file named .env.local and update the variables accordingly:
cp .env.example .env.local
Copy the local.settings.example.json file to a new file named local.settings.json inside the azure directory and update the variables:
cd ..\azure\ && cp local.settings.example.json local.settings.json
From the root directory, start the development server with one of the following commands:
npm run dev
# or
yarn dev
# or
pnpm dev
Start Azure Functions using one of these commands:
cd .\azure\ && npm run start
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/[routename]. Endpoints can be edited in pages/api/[routename]/route.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.