import argparse
import asyncio

from clarabot_nano.common.spawn.constants import ShortNames
from clarabot_nano.server.fstx.process import FilesystemTransactorServerProcess


async def startup():
    with FilesystemTransactorServerProcess.create(ShortNames.FSTX_SERVER) as proc:
        await proc.run()


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


if __name__ == "__main__":
    main()
