Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Microservices, Azure, Containers, Kubernetes, Infrastructure, Polyglot, etc

rahul sahay rahulsahay19

💭
Microservices, Azure, Containers, Kubernetes, Infrastructure, Polyglot, etc
View GitHub Profile
View ocelot.json
{
"Routes": [
{
"DownstreamPathTemplate": "/api/v1/movies",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5001
}
View MoviesController.cs
using System;
using System.Threading;
using Microsoft.AspNetCore.Mvc;
namespace MoviesAPI.Controllers
{
[ApiVersion("1")]
[Route("api/v{version:apiVersion}/[controller]")]
[ApiController]
public class MoviesController : ControllerBase
View startup.cs
using System.Text;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;
using Ocelot.Cache.CacheManager;
View ocelot.json
{
"Routes": [
{
"DownstreamPathTemplate": "/api/v1/movies",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5001
}
View startup.cs
using System.Text;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;
using Ocelot.Cache.CacheManager;
View ocelot.json
{
"Routes": [
{
"DownstreamPathTemplate": "/api/v1/movies",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5001
}
View startup.cs
using System.Text;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;
using Ocelot.DependencyInjection;
View ocelot.json
{
"Routes": [
{
"DownstreamPathTemplate": "/api/v1/movies",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5001
}
View program.cs
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace OcelotGateway
{
public static class Program
{
View ocelot.json
{
"Routes": [
{
"DownstreamPathTemplate": "/api/v1/movies",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5001
}
You can’t perform that action at this time.