This commit is contained in:
2020-11-23 15:47:41 +00:00
parent 2fe7364e85
commit 021ecc506a
4 changed files with 33 additions and 17 deletions

View File

@@ -1,8 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace qbridge.Controllers

View File

@@ -1,8 +1,11 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace qbridge
{
@@ -18,12 +21,13 @@ namespace qbridge
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers().AddNewtonsoftJson();
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.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
@@ -35,8 +39,17 @@ namespace qbridge
app.UseHsts();
}
app.UseRouting();
// app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
app.UseHttpsRedirection();
app.UseMvc();
// app.UseMvc();
}
}
}

View File

@@ -21,13 +21,18 @@ DEPLOYMENT qboauth.ayanova.com
publish command line from C:\data\code\qbridge folder:
//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
dotnet publish -o ./../publish/
3) COPY
## MAKE BACKUP FIRST: cp -R pecklist pecklist_backup
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
Backup the database

View File

@@ -1,13 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
</ItemGroup>
<!-- <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" /> -->
<!-- <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
<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>