コード例 #1
0
        private void InitializeHttpApiEndpoint()
        {
            _httpServer = new HttpServer();

            var httpApiDispatcherEndpoint = new LocalHttpServerApiDispatcherEndpoint(_httpServer);

            ApiController.RegisterEndpoint(httpApiDispatcherEndpoint);

            var httpRequestDispatcher = new HttpRequestDispatcher(_httpServer);

            httpRequestDispatcher.MapFolder("App", StoragePath.WithFilename("App"));
            httpRequestDispatcher.MapFolder("Storage", StoragePath.Root);
        }
コード例 #2
0
        private void InitializeHttpApi()
        {
            _httpServer = new HttpServer();
            var httpRequestDispatcher = new HttpRequestDispatcher(_httpServer);

            HttpApiController = httpRequestDispatcher.GetController("api");

            var appPath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "app");

            httpRequestDispatcher.MapFolder("app", appPath);
        }