package skilldesk.config;

import io.micronaut.context.annotation.Bean;
import io.micronaut.context.annotation.Factory;
import jakarta.inject.Singleton;
import org.apache.commons.dbcp2.BasicDataSource;

import javax.sql.DataSource;

@Factory
public class DataSourceConfig {

    @Singleton
    public DataSource dataSource() {
        BasicDataSource ds = new BasicDataSource();
        ds.setUrl("jdbc:sqlite:app.db");
        ds.setDriverClassName("org.sqlite.JDBC");
        return ds;
    }
}
