Files
point_of_sale_v2/PointOfSale/EpsonPrinterLinux/Program.cs

27 lines
575 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using EpsonPrinter.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
var builder = WebApplication.CreateBuilder(args);
builder.AddServiceDefaults();
// Services
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddScoped<EpsonPrintService>();
var app = builder.Build();
app.MapDefaultEndpoints();
// Swagger (altid aktiv vi er på en Pi, ikke i produktion)
app.UseSwagger();
app.UseSwaggerUI();
// Routing
app.MapControllers();
app.Run();