-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
When I follow this example:
// Require and initialize outside of your main handler
const mysql = require('serverless-mysql')({
config: {
host : process.env.ENDPOINT,
database : process.env.DATABASE,
user : process.env.USERNAME,
password : process.env.PASSWORD
}
})
// Main handler function
exports.handler = async (event, context) => {
// Run your query
let results = await mysql.query('SELECT * FROM table')
// Run clean up function
await mysql.end()
// Return the results
return results
}
By invoking my function locally:
sls invoke local -f myFunction
results
gets returned by the handler, but then it just hangs forever and the sls
command never returns (command prompt doesn't come back). I need to hit ctrl c to end it.
arturo-ojeda
Metadata
Metadata
Assignees
Labels
No labels