My question is that how can we access data from mysql database through node and then access this data in typescript class. I can get data from mysql database but i cant find a way that how can i get this data from server.js(A file where i have get data through node from mysql) into typescript class. Please help me it will be very helpful for me. Thanks
1 Answer
Here is a Nodejs driver for MySQL mysql. You can use this to connect to mysql in nodejs. Typescript is a superset of javascript. Every javascript library will work in typescript. The only difference is that you might need to create a d.ts file by yourself if there isn't an existing one.