Giter Site home page Giter Site logo

dia2001 / online_shop Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.9 MB

Build an api for a clothing sales system according to clean architecture. Using Asp.net core framework .

C# 44.17% Dockerfile 0.21% HTML 25.32% CSS 23.43% JavaScript 6.87%
asp-net-core

online_shop's Introduction

Online Shop README

Project xây dựng dựa trên kiến trúc Clean Architecture.

Call API

  • Run backend
  • Mở cookie trình duyệt
  • Sao chép accessToken
  • Vào http://localhost:5001/swagger/index.html
  • Mở Authorize
  • Bearer dan_access_token
  • Submit

Project structure

image

Cách chạy

  • cd vào OnlineShop.Backend
  • Vào terminal gõ dotnet build
  • cd vào OnlineShop.Application
  • Vào terminal gõ dotnet run

Cách Migrations DB (thứ cần có để kết nối DB)

  • Vào terminal gõ: dotnet tool install --global dotnet-ef
  • Cách kiểm tra cài đặt thành công, gõ lệnh: dotnet ef
  • Chỉnh sửa file appsetings.json trong folder OnlineShop.Application chỉnh sửa biến: connectionString ứng với chuỗi kết nối của mình
  • cd OnlineShop.Application, vào terminal gõ: dotnet ef migrations add TenBatKy (TenBatKy tương ứng với database=TenBatKy ở bước trên)
  • Chạy tiếp lệnh: dotnet ef database update

Chú ý

  • Đảm bảo đã cài môi trường MySQL và password trong WorkBench tương ứng password trong file DataContext.cs
  • Để có dữ liệu vào: http://localhost:5001/swagger/index.html, scroll xuống cuối nhấn api/seed để có dữ liệu
  • Nếu không login được FE thì chuyển sang nhánh Staging

online_shop's People

Contributors

dia2001 avatar

Stargazers

 avatar

Watchers

 avatar

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.