const express = require('express');
const router = express.Router();
const rt = require('../ResTool');
const config = require('../../config.json');
const fs = require('fs');
const mysql = require('../../libs/mysql_cls');
const tool = require('../../includes/apiTool');
const exec = require('child_process').exec;
const so = require('../../includes/storeObject');
const crypt = require('../../libs/crypto');

router
    .get('/', (req, res, n) => {
        // res.db = new mysql();
        // res.db.user = config.db.user;
        // res.db.password = config.db.pass;
        // res.db.host = config.db.host;
        // res.db.port = config.db.port;
        // res.db.database = config.db.db1;
        // res.db.connect();

        res.send({ name: 'WebIO IPCam API' });
    })
    .all('*', rt.send);

module.exports = router;