import argparse
import asyncio

from clarabot_nano.common.spawn.constants import ShortNames
from clarabot_nano.server.document.process import DocumentServerProcess


async def startup():
    with DocumentServerProcess.create(ShortNames.DOCUMENT_SERVER) as proc:
        await proc.run()


def main():
    parser = argparse.ArgumentParser("Clarabot Nano - Server process (document)")
    args = parser.parse_args()
    asyncio.run(startup())


if __name__ == "__main__":
    main()
