package leigh.astro.db;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import java.beans.PropertyVetoException;

public class AstroSql {
    public static ComboPooledDataSource getDataSource() throws PropertyVetoException {
        ComboPooledDataSource cpds = new ComboPooledDataSource();
        cpds.setDriverClass("com.mysql.cj.jdbc.Driver");
        cpds.setJdbcUrl("jdbc:mysql://localhost/astro");
        cpds.setUser("astro");
        cpds.setPassword(System.getenv("BADPASSWORD"));
        return cpds;
    }
}
