Skip to content

saizaax/next-pizza

Repository files navigation

Next Pizza — Website 🍕

Next.js React.js Redux TypeScript Docker GitHub Actions

✨ Preview • pizza.saizaax.dev

Technologies

Frontend

  • React.js
  • TypeScript
  • SCSS
  • Axios
  • Lodash

Backend

  • Next.js
  • MySQL
  • Prisma

How to run locally

  • Download & Install Node.js

  • Clone this repository

    git clone https://github.com/saizaax/next-pizza
  • Open terminal and navigate to repository directory

    cd next-pizza
  • Add .env file to root directory

    # Client-Side API URL
    NEXT_PUBLIC_API_URL='http://localhost:3000/api'
    
    # Database URL
    DATABASE_URL='mysql://database/next-pizza'
  • Install npm dependencies

    npm i
  • Generate Prisma Client (make sure your database is up)

    npx prisma generate
  • Run with npm

    npm run dev
  • Open in web-browser

    http://localhost:3000/

How to run in Docker

  • Download & Install Docker / Docker Desktop

  • Clone this repository

    git clone https://github.com/saizaax/next-pizza
  • Open terminal and navigate to repository directory

    cd next-pizza
  • Add .env file to root directory / Edit docker-compose.yml environment variables

    # Client-Side API URL
    NEXT_PUBLIC_API_URL='http://localhost:3000/api'
    
    # Database URL
    DATABASE_URL='mysql://database/next-pizza'
  • Run docker-compose

    docker-compose up --build --detach
  • Open in web-browser

    http://localhost:3000/

Contacts

2022 • Korolkov Alexander • @saizaaxsaizaax.off@gmail.com