GithubHelp home page GithubHelp logo

pj3.20231.20205232's Introduction

Khởi chạy dự án

  • Đầu tiên chạy câu lệnh sau để cài đặt các gói phụ thuộc:
npm i
  • Sau đó chạy câu lệnh sau để khởi chạy dự án:
npm run dev

Mở http://localhost:3000 với trình duyệt của bạn để xem kết quả.

Cài đặt biến môi trường

Khởi tạo file .env trong thư mục gốc của dự án và thêm các biến môi trường sau:

# Vercel secrets for production
AUTH_SECRET=

# For email
PASSWORD_RESET_URL=http://localhost:3000/auth/reset-password
SIGN_IN_URL=http://localhost:3000/auth/signin
VERIFICATION_URL=http://localhost:3000/verify

PAYMENT_SUCCESS_URL=http://localhost:3000/profile/orders
PAYMENT_CANCEL_URL=http://localhost:3000/profile/orders

# For cloudinary
CLOUD_NAME=
CLOUD_API_KEY=
CLOUD_API_SECRET=

# For payment gateway
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
  • Đối với AUTH_SECRET, bạn có thể tạo bằng cách truy cập trang https://generate-secret.vercel.app/
  • Đối với CLOUD_NAME, CLOUD_API_KEY, CLOUD_API_SECRET, bạn có thể tạo tài khoản tại https://cloudinary.com/, sau đó tạo một cloud name và lấy api key và api secret.
  • Đối với STRIPE_PUBLISHABLE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, bạn có thể tạo tài khoản tại https://stripe.com/, sau đó tạo một tài khoản và lấy api key và webhook secret.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.