npm 10.2.4
node 20.11.0 LTS
npm ci
- install dependencies into thenode_modules/
directory usingpackage-lock.json
npx husky install
- setup precommit eslint typescript checksecho 'NEXT_PUBLIC_API_HOST_REMOTE=https://iced-latte.uk/backend/api/v1' > .env
- create.env
npm run build
- build artifactsnpm run dev
- run project onlocalhost:3000
(if on the main page u do not see list of products due to CORS error, run dev server withyarn next dev --hostname 127.0.0.1
)
npm run test
npm run lint -- --fix
Similar to commands from Dockerfile
, that is used for deployment:
rm -rf node_modules && npm ci --omit=dev
npm run build
npm run start
Start the application container with the latest build:
docker-compose -f docker-compose.local.yml up -d --build
View logs:
docker-compose -f docker-compose.local.yml logs iced-latte-frontend -f
Stop running container:
docker-compose -f docker-compose.local.yml down
Backend API reference: https://iced-latte.uk/backend/api/docs/swagger-ui/index.html