This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
|
|
||||||
namespace qbridge.Controllers
|
namespace qbridge.Controllers
|
||||||
|
|||||||
21
Startup.cs
21
Startup.cs
@@ -1,8 +1,11 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace qbridge
|
namespace qbridge
|
||||||
{
|
{
|
||||||
@@ -18,12 +21,13 @@ namespace qbridge
|
|||||||
// This method gets called by the runtime. Use this method to add services to the container.
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
services.AddControllers().AddNewtonsoftJson();
|
||||||
services.AddHttpClient();
|
services.AddHttpClient();
|
||||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
// services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
@@ -35,8 +39,17 @@ namespace qbridge
|
|||||||
app.UseHsts();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.UseRouting();
|
||||||
|
|
||||||
|
// app.UseAuthorization();
|
||||||
|
app.UseEndpoints(endpoints =>
|
||||||
|
{
|
||||||
|
endpoints.MapControllers();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseMvc();
|
// app.UseMvc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,13 +21,18 @@ DEPLOYMENT qboauth.ayanova.com
|
|||||||
publish command line from C:\data\code\qbridge folder:
|
publish command line from C:\data\code\qbridge folder:
|
||||||
|
|
||||||
//this will build a release version which is what we use on the server now
|
//this will build a release version which is what we use on the server now
|
||||||
dotnet publish -c Release -o ./../publish/
|
//DEPRECATED dotnet publish -c Release -o ./../publish/
|
||||||
|
//this will build for our ubunutu linux server
|
||||||
|
dotnet publish -c Release -o ./../publish/ --no-self-contained -r linux-x64
|
||||||
|
|
||||||
|
|
||||||
//if need a debug version
|
//if need a debug version
|
||||||
dotnet publish -o ./../publish/
|
dotnet publish -o ./../publish/
|
||||||
|
|
||||||
3) COPY
|
3) COPY
|
||||||
|
|
||||||
|
## MAKE BACKUP FIRST: cp -R pecklist pecklist_backup
|
||||||
|
|
||||||
Copy over to production server, only need the .dll and the wwwroot folder contents,
|
Copy over to production server, only need the .dll and the wwwroot folder contents,
|
||||||
remember not to delete the folders on the server only replace their contents because there are file permissions set
|
remember not to delete the folders on the server only replace their contents because there are file permissions set
|
||||||
Backup the database
|
Backup the database
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<!-- <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" /> -->
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
|
<!-- <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
|
||||||
</ItemGroup>
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0" /> -->
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0" />
|
||||||
|
<!-- <PackageReference Include="jose-jwt" Version="2.6.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" /> -->
|
||||||
|
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user