Commit 042e8945 authored by Yábir Benchakhtir's avatar Yábir Benchakhtir Committed by GitHub

Merge pull request #51 from yalh76/port

Adding port setting
parents 1ff8ea72 3c2a65c4
......@@ -5,6 +5,7 @@ server_description: ''
# http config
scheme: 'http'
domain: 'localhost'
port: '3000'
# Positition
root_path: '/home/yabir/anfora'
......
{application_name: Anfora,
domain: anfora.test,
port: 3000,
icons_folder: icons,
image_folder: max_resolution,
media_folder: /home/yabir/anfora/uploads,
......
......@@ -32,7 +32,7 @@ from api.v1.notifications import NotificationHandler
from api.v1.explore import (ExploreUsers, ExploreServer)
from settings import ROOT_PATH
from settings import (ROOT_PATH, PORT)
import tornado.options
......@@ -103,7 +103,7 @@ if __name__ == "__main__":
#AsyncIOMainLoop().install()
app = make_app()
app.listen(3000)
app.listen(PORT)
app.objects = peewee_async.Manager(db)
#loop = asyncio.get_event_loop()
......
......@@ -2,14 +2,15 @@ NODENAME = "Anfora"
SUMMARY = ""
SCHEME = "https"
DOMAIN ="anfora.test"
PORT = "3000"
BASE_URL ="https://anfora.test"
ID=BASE_URL
MEDIA_FOLDER = "/home/yabir/killMe/uploads"
thumb_folder="small"
pic_folder="max_resolution"
icon="icons"
salt_code="whySoSalty?"
SECRET="MySeCrEt"
thumb_folder = "small"
pic_folder = "max_resolution"
icon = "icons"
salt_code = "whySoSalty?"
SECRET = "MySeCrEt"
ROOT_PATH = "/home/yabir/killMe/anfora"
DB_USER = "anforauser"
DB_PWD = "anforapwd"
......
......@@ -10,14 +10,15 @@ def create_settings(filen):
f'NODENAME = "{settings.get("application_name")}"\n'
f'SUMMARY = "{settings.get("server_description")}"\n'
f'SCHEME = "{settings.get("scheme")}"\n'
f'DOMAIN ="{settings.get("domain")}"\n'
f'BASE_URL ="{settings.get("scheme")}://{settings.get("domain")}"\n'
'ID=BASE_URL\n'
f'DOMAIN = "{settings.get("domain")}"\n'
f'PORT = "{settings.get("port")}"\n'
f'BASE_URL = "{settings.get("scheme")}://{settings.get("domain")}"\n'
'ID = BASE_URL\n'
f'MEDIA_FOLDER = "{settings.get("media_folder")}"\n'
f'thumb_folder="{settings.get("thumb_folder")}"\n'
f'pic_folder="{settings.get("image_folder")}"\n'
f'icon="{settings.get("icons_folder")}"\n'
f'salt_code="{str(bcrypt.gensalt())}"\n'
f'thumb_folder = "{settings.get("thumb_folder")}"\n'
f'pic_folder = "{settings.get("image_folder")}"\n'
f'icon = "{settings.get("icons_folder")}"\n'
f'salt_code = "{str(bcrypt.gensalt())}"\n'
f'SECRET = "{binascii.hexlify(os.urandom(64)).decode()}"\n'
f'ROOT_PATH = "{settings.get("root_path")}"\n'
f'DB_USER = "{settings.get("db_user")}"\n'
......@@ -27,7 +28,7 @@ def create_settings(filen):
f'DB_NAME = "{settings.get("db_name")}"\n'
f'EMAIL_ENABLED = {settings.get("email_enabled")}\n'
f'DEBUG = {settings.get("DEBUG")}\n'
f'REG_OPEN={settings.get("reg", True)}\n'
f'REG_OPEN = {settings.get("reg", True)}\n'
)
if settings.get("email_enabled"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment