File tree Expand file tree Collapse file tree 11 files changed +18
-5
lines changed Expand file tree Collapse file tree 11 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ public static void Main(string[] args)
17
17
{
18
18
var hostingConfig = new ConfigurationBuilder ( )
19
19
. AddJsonFile ( "hosting.json" , optional : true )
20
+ . AddEnvironmentVariables ( )
21
+ . AddEnvironmentVariables ( prefix : "ASPNET_" )
20
22
. AddCommandLine ( args )
21
23
. Build ( ) ;
22
24
Original file line number Diff line number Diff line change 18
18
},
19
19
"Benchmarks" : {
20
20
"commandName" : " Benchmarks" ,
21
- "commandLineArgs" : " --app.EnableDbTests=true" ,
21
+ "commandLineArgs" : " --app.EnableDbTests=true --app.EnableStaticFileTests=true" ,
22
+ "launchBrowser" : true ,
23
+ "launchUrl" : " http://localhost:5001/" ,
22
24
"environmentVariables" : {
23
25
"AspNet_Environment" : " Development"
24
26
}
Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ public void Configure(IApplicationBuilder app)
93
93
94
94
app . UseMvc ( ) ;
95
95
96
+ if ( StartupOptions . EnableStaticFileTests )
97
+ {
98
+ app . UseStaticFiles ( ) ;
99
+ Console . WriteLine ( "Static file tests enabled" ) ;
100
+ }
101
+
96
102
app . Run ( context => context . Response . WriteAsync ( "Try /plaintext instead" ) ) ;
97
103
}
98
104
@@ -109,6 +115,8 @@ public class Options
109
115
{
110
116
public bool EnableDbTests { get ; set ; }
111
117
118
+ public bool EnableStaticFileTests { get ; set ; }
119
+
112
120
public string ConnectionString { get ; set ; }
113
121
}
114
122
}
Original file line number Diff line number Diff line change 7
7
},
8
8
9
9
"dependencies" : {
10
+ "Dapper" : " 1.50.0-*" ,
11
+ "EntityFramework.Commands" : " 7.0.0-*" ,
12
+ "EntityFramework.MicrosoftSqlServer" : " 7.0.0-*" ,
10
13
"Microsoft.AspNet.Mvc" : " 6.0.0-*" ,
11
14
"Microsoft.AspNet.Server.Kestrel" : " 1.0.0-*" ,
12
15
"Microsoft.AspNet.Server.WebListener" : " 1.0.0-*" ,
16
+ "Microsoft.AspNet.StaticFiles" : " 1.0.0-*" ,
13
17
"Microsoft.Extensions.WebEncoders" : " 1.0.0-*" ,
14
- "EntityFramework.Commands" : " 7.0.0-*" ,
15
- "EntityFramework.MicrosoftSqlServer" : " 7.0.0-*" ,
16
- "Newtonsoft.Json" : " 7.0.1" ,
17
- "Dapper" : " 1.50.0-*"
18
+ "Newtonsoft.Json" : " 7.0.1"
18
19
},
19
20
20
21
"commands" : {
You can’t perform that action at this time.
0 commit comments