text: module.exports = function(app, sql, sqlConfig){
  
      app.get('/productattribute/add/:name', function(req, res){
          console.log('call to api/productattribute/add');
          const pool = new sql.ConnectionPool(sqlConfig, err => {
                  if(err) console.log(err);
  
                  var name = req.params.name;
  
                  var request = pool.request();
                  
                  var queryText = `insert into dbo.ProductAttributes([Name], CreatedAt) \
                                      values('${name}', getdate())`;
  
                      request.query(queryText, (err, recordset) => {
                              if(err) console.log(err);
  
                              var data = {
                                  success: true,
                                  message: 'added productattribute'
                              }
  
                              res.send(data);
                      })
          });
          
          pool.on('error', err => {
              res.send({error: err, success:false});
          });
      })
  
      app.get('/productattribute/remove/:id', function(req, res){
          console.log('call to api/productattribute/remove');
          const pool = new sql.ConnectionPool(sqlConfig, err => {
                  if(err) console.log(err);
  
                  var id = req.params.id;
  
                  var request = pool.request();
                  
                  var queryText = `delete from dbo.ProductAttributes where dbo.ProductAttributes.ProductAttributeId = ${id}`;
  
                      request.query(queryText, (err, recordset) => {
                              if(err) console.log(err);
  
                              var data = {
                                  success: true,
                                  message: 'ProductAttributes deleted',
                                  device: id,
                                  rowsAffected: recordset.rowsAffected
                              }
  
                              res.send(data);
                      })
          });
          
          pool.on('error', err => {
              res.send({error: err, success:false});
          });
      })
  
      app.get('/productattribute/edit/:id.:name', function(req, res){
          console.log('call to api/productattributes/update');
          const pool = new sql.ConnectionPool(sqlConfig, err => {
                  if(err) console.log(err);
  
                  var id = req.params.id;
                  var name = req.params.name;
  
                  var request = pool.request();
                  
                  var queryText = `update dbo.ProductAttributes set [Name] = '${name}'
                                  where [ProductAttributeId] = '${id}'`;
  
                      request.query(queryText, (err, recordset) => {
                              if(err) console.log(err);
  
                              var data = {
                                  success: true,
                                  message: 'productattributes updated',
                                  device: name,
                                  rowsAffected: recordset.rowsAffected
                              }
  
                              res.send(data);
                      })
          });
          
          pool.on('error', err => {
              res.send({error: err, success:false});
          });
      })
  
      app.get('/productattribute/all', function(req, res){
          console.log(`${new Date()}: get all productattribute`);
          const pool = new sql.ConnectionPool(sqlConfig, err => {
                  if(err) console.log(err);
  
                  var request = pool.request();
                  
                  var queryText = `select * from dbo.ProductAttributes`;
  
                  request.query(queryText, (err, recordset) => {
                              if(err) console.log(err);
  
                              var data = {
                                  success: true,
                                  message: '',
                                  data: recordset.recordset
                              }
  
                              res.send(data);
                  })
          });
          
          pool.on('error', err => {
              res.send({error: err, success:false});
          });
      })
  
      app.get('/productattribute/:id', function(req, res){
          console.log(`${new Date()}: get a productattribute`);
          const pool = new sql.ConnectionPool(sqlConfig, err => {
                  if(err) console.log(err);
  
                  var id = req.params.id;
  
                  var request = pool.request();
                  
                  var queryText = `select * from dbo.ProductAttribute where ProductAttributeId = ${id}`;
  
                  request.query(queryText, (err, recordset) => {
                              if(err) console.log(err);
  
                              var data = {
                                  success: true,
                                  message: '',
                                  data: recordset.recordset
                              }
  
                              res.send(data);
                  })
          });
          
          pool.on('error', err => {
              res.send({error: err, success:false});
          });
      })
  }