// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, NHLStatsContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } if (env.IsDevelopment()) { app.UseCors(builder => { builder.WithOrigins("https://localhost:5001", "http://localhost:3000", "http://127.0.0.1:4200") .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials(); }); } //app.UseGraphiQl(); app.UseGraphQL <NHLStatsSchema>("/graphql"); app.UseGraphQLPlayground(options: new GraphQLPlaygroundOptions()); app.UseMvc(); db.EnsureSeedData(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, NHLStatsContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseGraphiQl(); app.UseMvc(); db.EnsureSeedData(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, NHLStatsContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseWebSockets(); app.UseGraphQLWebSockets <NHLStatsSchema>("/graphql"); app.UseGraphiQl("/ui/graphiql", "/graphql"); app.UseMvc(); db.EnsureSeedData(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, NHLStatsContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseCors(x => x.AllowAnyHeader().AllowAnyMethod().WithOrigins("http://localhost:8080")); app.UseGraphiQl(); app.UseMvc(); db.EnsureSeedData(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, NHLStatsContext db) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseStaticFiles(); app.UseSpaStaticFiles(); var playGround = "/ui/playground"; var options = new DashboardOptions { AppPath = playGround }; app.UseHangfireDashboard("/hangfire", options); app.UseGraphQLPlayground(new GraphQLPlaygroundOptions() { Path = playGround }); app.UseGraphiQl(); // app.UseMvc(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller}/{action=Index}/{id?}"); }); // Azure SignalR app.UseAzureSignalR(routes => { routes.MapHub <NotificationHub>("/notifications"); }); app.UseSpa(spa => { spa.Options.SourcePath = "clientApp"; if (env.IsDevelopment()) { spa.UseReactDevelopmentServer(npmScript: "start"); } }); db.EnsureSeedData(); }