using System.Net; using Microsoft.Extensions.DependencyInjection; using Grapevine; /** * ServiceLifetime.Singleton tells the server to keep the same * resource around for the entire time the application runs, instead * of creating a fresh resource for every request. */ [RestResource] [ResourceLifetime(ServiceLifetime.Singleton)] public class VociRoutes { // TODO: load the unit from CSV private Unit unit; [RestRoute("Get", "/random")] public async Task Random(IHttpContext context) { // TODO: Choose a random word from the unit and return in the request. } }