This repository was archived by the owner on Nov 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·44 lines (40 loc) · 1.74 KB
/
run.py
File metadata and controls
executable file
·44 lines (40 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python
# coding=UTF-8
# Isotammi Genealogical Service for combining multiple researchers' results.
# Created in co-operation with the Genealogical Society of Finland.
#
# Copyright (C) 2016-2021 Juha Mäkeläinen, Jorma Haapasalo, Kari Kujansuu,
# Timo Nallikari, Pekka Valta
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import platform
# On linux system uids are < 1000. I know nothin about windows uids.
# This should tell if we are on server or developer enviroment:
running_on_server = ((platform.system() == "Linux") and (os.getuid() < 1000))
#running_on_server = os.path.isdir('/var/log/httpd/stkserver')
if running_on_server:
import sys
sys.path.insert(0, os.path.join(os.getcwd(),"app"))
from app import app as application
application.secret_key = "You don'n know OUR secret key"
else:
if __name__ == '__main__':
import logging
neo4j_log = logging.getLogger("neo4j.bolt")
neo4j_log.setLevel(logging.WARNING)
# werkzeug_log = logging.getLogger("werkzeug")
# werkzeug_log.setLevel(logging.WARNING)
from app import app
app.run()