Signed-off-by: Walamana <joniogerg@gmail.com>
This commit is contained in:
Walamana 2017-11-27 18:09:11 +01:00
parent a285b8e620
commit cc658a37c6

4
app.js
View File

@ -15,7 +15,7 @@ var con = mysql.createConnection({
password: "Wnc4q_75",
database: "minis",
ssl: {
ca: fs.readFileSync(process.cwd() + "/mysql-ca.ctf")
ca: fs.readFileSync(process.cwd() + "/mysql-ca.crt")
}
});
@ -29,7 +29,7 @@ con.connect(err => {
app.get('/', (req, res) => {
if(!isConnected()){res.send("No Connection to database<br>" + JSON.stringify(cause) + "<br>" + fs.readFileSync(process.cwd() + "/mysql-ca.ctf"));return}
if(!isConnected()){res.send("No Connection to database<br>" + JSON.stringify(cause));return}
res.send("Welcome to the miniplan api!");
});