mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-07-27 07:45:41 +00:00
fix fs exists problem
This commit is contained in:
@@ -8,6 +8,10 @@ var getPort = require('./getPort'),
|
||||
url = require('url'),
|
||||
exec = require('child_process').exec;
|
||||
|
||||
if(!fs.exists("cert/tmpCert")){
|
||||
fs.mkdir("cert/tmpCert");
|
||||
}
|
||||
|
||||
module.exports =function(){
|
||||
var self = this;
|
||||
self.serverList = {
|
||||
@@ -31,7 +35,6 @@ module.exports =function(){
|
||||
|
||||
//create server with corresponding CA
|
||||
}else{
|
||||
fs.mkdir("cert/tmpCert");
|
||||
var keyFile = "./cert/tmpCert/__hostname.key".replace(/__hostname/,hostname),
|
||||
crtFile = "./cert/tmpCert/__hostname.crt".replace(/__hostname/,hostname);
|
||||
|
||||
|
Reference in New Issue
Block a user