// Importing the database instance
import db from "./db/db";
// Example function that queries the database
export const getUserData = async (userId: string) => {
const userData = await db.query(`SELECT * FROM users WHERE id = ${userId}`);
return userData;
};
// Another function that doesn't interact with the database
export const simpleCalculation = (a: number, b: number) => {
return a + b;
};
// Importing the database instance
import db from "./db/db";
// Example function that queries the database
export const getUserData = async (userId: string) => {
const userData = await db.query(`SELECT * FROM users WHERE id = ${userId}`);
return userData;
};
// Another function that doesn't interact with the database
export const simpleCalculation = (a: number, b: number) => {
return a + b;
};