import os import sys from swampdragon.swampdragon_server import run_server os.environ.setdefault('DJANGO_SETTINGS_MODULE','OnlineDating.settings') print(sys.argv) run_server(sys.argv[1])
#!/usr/bin/python2.7 import os import sys from swampdragon.swampdragon_server import run_server os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pandorabox.settings") host_port = sys.argv[1] if len(sys.argv) > 1 else None run_server(host_port=host_port)
# published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # """ Websocket server, based on Tornado & SwampDragon """ # Imports ##################################################################### import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencraft.settings") from django.conf import settings from swampdragon.swampdragon_server import run_server # Main ######################################################################## host_port = sys.argv[1] if len( sys.argv) > 1 else settings.DRAGON_SERVER_ADDRESS_PORT run_server(host_port=host_port)
#!/usr/bin/env python import os from swampdragon.swampdragon_server import run_server os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sistema_dietas.settings") run_server() ''' #!/usr/bin/env python import os import sys from swampdragon.swampdragon_server import run_server os.environ.setdefault("DJANGO_SETTINGS_MODULE", "<project>.settings") host_port = sys.argv[1] if len(sys.argv) > 1 else None run_server(host_port=host_port) '''
#!/usr/bin/env python import os from swampdragon.swampdragon_server import run_server os.environ.setdefault("DJANGO_SETTINGS_MODULE", "notifications.settings") run_server()
def handle(self, *args, **options): run_server(host_port=options['host_port'])
def handle(self, *args, **options): host_port = None if args: host_port = args[0] run_server(host_port=host_port)