This project has only one env:
API_URL
default: http://localhost:3030
This project runs on port 3031 by default and was builded with NodeJS v21.7.3 but older versions should work just fine
You must have the Backend API running on port 3030 or change the API_URL
env variable to the correct port
I recommend leaving all default, backend on 3030 and frontend on 3031
Clone the project
git clone https://github.com/henriquemod/products-nextjs.git
Go to the project directory
cd products-nextjs
Install dependencies
npm install
# for development environment
npm run dev
# or for production environment
npm run build
npm run start
Once the project is started you access the website on http://localhost:3031
username: admin
password: admin
Ensure you have the backend API running and the NextJS server running before running the tests, before proceeding, please check the system requirements to ensure your system has all the necessary dependencies installed
You can run the tests with:
npm run cypress:run # for headless mode - NOTE: requires google-chrome installed
# in case you don't have google-chrome installed you can run
npm run cypress:run:electron
# or
npm run cypress:open # for interactive mode
IMPORTANT - If you changed the default ports for backend API or NestJS, you must change the baseUrl
and API_URL
in the cypress.config.ts
file otherwise the tests will fail