import axios from 'axios'

const serverUrl = 'http://192.168.0.105:60000';

const server = axios.create({
    baseURL: serverUrl,
    timeout: 5000
});


async function postReq(url, paramater) {
    return new Promise((resolve, reject) => {
        server.post(url, paramater).then(res => {
            resolve(res.data);
        }).catch(error => {
            resolve(error);
        })
    });
}

export default postReq