Exemple #1
0
def buildStatic(aid,appDocument,appHost,appPort):
    "生成静态文件配置文件"
    baseObj=getBaseConfig()
    data=getFile("static.conf")
    data=data.replace("{{ appId }}",aid).replace("{{ appDocument }}",appDocument).replace("{{ appHost }}",appHost).replace("{{ appPort }}",str(appPort))
    fp=open(baseObj['nginx']['confPath']+"/"+aid+".conf","w")
    fp.write(data)
    fp.close()
Exemple #2
0
def buildStatic(aid, appDocument, appHost, appPort):
    "生成静态文件配置文件"
    baseObj = getBaseConfig()
    data = getFile("static.conf")
    data = data.replace("{{ appId }}",
                        aid).replace("{{ appDocument }}", appDocument).replace(
                            "{{ appHost }}",
                            appHost).replace("{{ appPort }}", str(appPort))
    fp = open(baseObj['nginx']['confPath'] + "/" + aid + ".conf", "w")
    fp.write(data)
    fp.close()
Exemple #3
0
def buildWelcomeFile(aid):
    "初始化应用目录"
    baseObj=getBaseConfig()#获取配置文件
    html=getFile("index.html")
    
    path=baseObj['base']['allAppDocument']+"/"+str(aid)
    if not os.path.exists(path):
        os.makedirs(path)
    
        
    fp=open(baseObj['base']['allAppDocument']+"/"+str(aid)+"/index.html","w")
    fp.write(html)
    fp.close()
Exemple #4
0
def buildWelcomeFile(aid):
    "初始化应用目录"
    baseObj = getBaseConfig()  #获取配置文件
    html = getFile("index.html")

    path = baseObj['base']['allAppDocument'] + "/" + str(aid)
    if not os.path.exists(path):
        os.makedirs(path)

    fp = open(
        baseObj['base']['allAppDocument'] + "/" + str(aid) + "/index.html",
        "w")
    fp.write(html)
    fp.close()