forked from AcaMate/AcaMate_Web
1. /am/... 도메인 생성 2. /am/intro 페이지 생성 3. 메인 레이아웃 상황 따라 변경 4. 로그인 정보 받아오는 로직 변경 중 4.1. 유저 정보에 대한 JSON은 받아왔으나 이를 저장하는 로직 구현 중 4.2. 로그인 정보를 받아오는 로직을 어디서 구현해야 할 지 고민 하는 중
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
using Front;
|
|
using Front.Program.Services;
|
|
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
|
|
builder.RootComponents.Add<App>("#app");
|
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
|
|
|
// 설정 파일 로드
|
|
// builder.Configuration.AddJsonFile("appsettings.json", optional: false);
|
|
builder.Configuration.AddJsonFile($"appsettings.{builder.HostEnvironment.Environment}.json", optional: true);
|
|
|
|
builder.Services.AddScoped(sp => //new HttpClient
|
|
{
|
|
|
|
|
|
var config = builder.Configuration;
|
|
var http = new HttpClient
|
|
{
|
|
// BaseAddress = new Uri("http://0.0.0.0:5144")
|
|
BaseAddress = new Uri("https://devacamate.ipstein.myds.me")
|
|
// BaseAddress = builder.HostEnvironment.IsDevelopment()
|
|
// ? new Uri("https://devacamate.ipstein.myds.me")
|
|
// : new Uri("https://acamate.ipstein.myds.me")
|
|
|
|
};
|
|
return http;
|
|
});
|
|
|
|
// SCOPED 으로 등록된 서비스는 DI 컨테이너에 등록된 서비스의 인스턴스를 사용합니다.
|
|
builder.Services.AddScoped<APIService>();
|
|
builder.Services.AddScoped<SecureService>();
|
|
builder.Services.AddScoped<StorageService>();
|
|
// builder.Services.AddRazorPages();
|
|
// builder.Services.AddServerSideBlazor();
|
|
builder.Services.AddScoped<LoadingService>();
|
|
builder.Services.AddScoped<UserService>();
|
|
|
|
|
|
await builder.Build().RunAsync();
|