You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
778 B

8 years ago
#!/usr/bin/env python3
#
# Copyright (c) 2016, Neil Booth
#
# All rights reserved.
#
# See the file "LICENCE" for information about the copyright
8 years ago
# and warranty status of this software.
'''Script to kick off the server.'''
8 years ago
import logging
import traceback
from server.env import Env
from server.controller import Controller
8 years ago
def main():
'''Set up logging and run the server.'''
8 years ago
logging.basicConfig(level=logging.INFO)
logging.info('ElectrumX server starting')
try:
controller = Controller(Env())
controller.run()
8 years ago
except Exception:
traceback.print_exc()
logging.critical('ElectrumX server terminated abnormally')
else:
logging.info('ElectrumX server terminated normally')
if __name__ == '__main__':
main()