Skip to content

Commit

Permalink
Update azurite entry for blob server factory
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoningLiu committed Nov 11, 2019
1 parent a1169ab commit df5bf1d
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions src/azurite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ import { access } from "fs";
import { dirname, join } from "path";
import { promisify } from "util";

import BlobConfiguration from "./blob/BlobConfiguration";
import BlobServer from "./blob/BlobServer";
import {
DEFAULT_BLOB_EXTENT_LOKI_DB_PATH,
DEFAULT_BLOB_LOKI_DB_PATH,
DEFAULT_BLOB_PERSISTENCE_ARRAY
} from "./blob/utils/constants";
import { BlobServerFactory } from "./blob/BlobServerFactory";
import Environment from "./common/Environment";
import * as Logger from "./common/Logger";
import QueueConfiguration from "./queue/QueueConfiguration";
Expand Down Expand Up @@ -40,18 +34,9 @@ async function main() {
await accessAsync(dirname(debugFilePath!));
}

// Initialize server configuration
const blobConfig = new BlobConfiguration(
env.blobHost(),
env.blobPort(),
join(location, DEFAULT_BLOB_LOKI_DB_PATH),
join(location, DEFAULT_BLOB_EXTENT_LOKI_DB_PATH),
DEFAULT_BLOB_PERSISTENCE_ARRAY,
!env.silent(),
undefined,
env.debug() !== undefined,
env.debug()
);
const blobServerFactory = new BlobServerFactory();
const blobServer = await blobServerFactory.createServer();
const blobConfig = blobServer.config;

// TODO: Align with blob DEFAULT_BLOB_PERSISTENCE_ARRAY
// TODO: Join for all paths in the array
Expand All @@ -78,7 +63,6 @@ async function main() {
Logger.configLogger(blobConfig.enableDebugLog, blobConfig.debugLogFilePath);

// Create server instance
const blobServer = new BlobServer(blobConfig);
const queueServer = new QueueServer(queueConfig);

// Start server
Expand Down

0 comments on commit df5bf1d

Please sign in to comment.