--- tags: music-library,solution,track --- # 'gets all artist records' pg solution ```javascript= // Remember your create function will already be here const getAllArtists = async (_, res) => { try { const { rows } = await db.query('SELECT * FROM Artists') res.status(200).json(rows) } catch (err) { res.status(500).json(err.message) } } module.exports = { ..., getAllArtists } ``` Export all of your functions!
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up