This post has JS code that does it as well as explanations how it all works: https://ton-community.github.io/tutorials/01-wallet/
You should be able to get the wallet address like so:
import { mnemonicToWalletKey } from "ton-crypto";
import { WalletContractV4 } from "ton";
async function main() {
// open wallet v4 (notice the correct wallet version here)
const mnemonic = "unfold sugar water ..."; // your 24 secret words (replace ... with the rest of the words)
const key = await mnemonicToWalletKey(mnemonic.split(" "));
const wallet = WalletContractV4.create({ publicKey: key.publicKey, workchain: 0 });
// print wallet address
console.log(wallet.address.toString({ testOnly: true }));
}
main();