Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //instanciando o modulo mysql
- return connection;
- //recuperando a biblioteca do express
- //setup do express
- module.exports = function(app){
- //instanciando o retorno da funcao da conexao
- var connection = app.infra.dbConnection();
- app.get('/home', function(request, response){
- connection.query('SELECT * from usuarios ', function(erro, retorno){
- response.render("home/index", { lista: retorno });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement