1

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
  • 1
    Does your typescript code run on your server (in node.js) or in a browser? Please edit your question to explain your situation with more detail. Commented Aug 6, 2019 at 10:43

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.