require
is running code
const queryParam = (error, result) => {
if (error) throw error;
res.status(200).json(result);
};
exports.get_all_customers = (req, res) => {
const FETCH_CUSTOMERS = "SELECT * FROM Customers";
db.query(FETCH_CUSTOMERS, queryParam);
};
exports.get_customer = (req, res) => {
const GET_CUSTOMER_BY_ID = `SELECT * FROM Customers WHERE id = ${req.params.id}`;
db.query(GET_CUSTOMER_BY_ID, queryParam);
};
ReferenceError: res is not defined
res
into result
TypeError: result.status is not a function
What would be the most appropriate way to create a withdrawal system? The user having virtual currencies (firebase) and exchanging them for ERC20 tokens?
The user makes a request to api and when I receive the request on the node.js server I have to approve first then transfer? should I do it in a contract or a wallet? Is there a way to make these transactions safe and automatic?
Hello Everyone,
MERN Micro Framework provides starter kits for building web, desktop and mobile apps in pure JavaScript.
https://www.npmjs.com/package/create-mernjs-app
If you have any query or suggestions. Please let me know.