This is a Next.js project bootstrapped with create-next-app
.
This project has been created just for learning purposes, using the following resources:
- Should I deploy today - This app has been taken as a base for the development of this project, taking advantage of its idea, architecture and API
- OpenAI - In order to translate the messages received by the "Should I deploy" API, the Open AI API is used through the completion's functionality
This project can be visualized in three ways, both ways need you to have an environment variable, since it is using the OpenAi API to perform the translation of the messages.
create a .env.local
file and add:
OPENAI_API_KEY={"your OpenAI API key"}
You can clone the repository and use node to run the project
npm install
npm run dev
# or
yarn install
yarn dev
# or
pnpm install
pnpm dev
Here you can use your favorite service to deploy the project, just make sure of setting the environment variable.
Make sure you have docker install in your machine and have created the .env.local
file once you cloned the repository.
docker build -t {name of image}
# then
docker run -p 3000:3000 --env-file ./.env.local {name of image}
This project implement Playwright for making e2e testing, you can run the test locally in the following way:
npm run build
npm start
# or
yarn build
yarn start
# or
pnpm build
pnpm start
Then in another terminal run:
npm run test:e2e
# or
yarn run test:e2e
# or
pnpm run test:e2e