Skip to content

Commit 1f251d9

Browse files
Swagger: swagger added to azure for easily testing api (#36)
1 parent 6192fd5 commit 1f251d9

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/Chirp.SimpleDB/Program.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
var builder = WebApplication.CreateBuilder(args);
99

1010
// Add services to the container.
11-
1211
builder.Services.AddSingleton<IStorageProvider<StorageChirpRecord>, ChirpStorageProvider>();
13-
14-
// builder.Services.AddControllers();
1512
builder.Services.AddControllers().AddNewtonsoftJson();
16-
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
13+
14+
// swagger
1715
builder.Services.AddEndpointsApiExplorer();
1816
builder.Services.AddSwaggerGen();
1917

@@ -24,15 +22,13 @@
2422
.AllowAnyMethod()
2523
.AllowAnyHeader());
2624

27-
// Configure the HTTP request pipeline.
28-
if (app.Environment.IsDevelopment())
29-
{
30-
app.UseSwagger();
31-
app.UseSwaggerUI();
32-
}
25+
26+
app.UseSwagger();
27+
app.UseSwaggerUI();
3328

3429
app.UseHttpsRedirection();
3530

31+
// Not useful right now
3632
// app.UseAuthorization();
3733

3834
app.MapControllers();

src/Chirp.SimpleDB/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dotnetRunMessages": true,
1515
"launchBrowser": true,
1616
"launchUrl": "swagger",
17-
"applicationUrl": "http://localhost:5235",
17+
"applicationUrl": "https://bdsagroup3chirpremotedb.azurewebsites.net",
1818
"environmentVariables": {
1919
"ASPNETCORE_ENVIRONMENT": "Development"
2020
}
@@ -24,7 +24,7 @@
2424
"dotnetRunMessages": true,
2525
"launchBrowser": true,
2626
"launchUrl": "swagger",
27-
"applicationUrl": "https://localhost:7165;http://localhost:5235",
27+
"applicationUrl": "https://bdsagroup3chirpremotedb.azurewebsites.net",
2828
"environmentVariables": {
2929
"ASPNETCORE_ENVIRONMENT": "Development"
3030
}

0 commit comments

Comments
 (0)