-3

I am a beginner at react native mobile development. I need to connect react native and MSSQL database through express js API. Can anyone guide me in this regard? recommend me some tutorials? any one can guide me?

1

1 Answer 1

0

You need to have REST APIs build using expressjs and then these APIs will be taking to your database using the MySQL library for nodejs and at the end, your react application will talk to REST API.

connect to MySQL like this:

var mysql      = require('mysql');
var connection = mysql.createConnection({
  host     : 'localhost',
  user     : 'me',
  password : 'secret',
  database : 'my_db'
});
 
connection.connect();
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you. i already have created express backend for website. this system has mobile app also. so how can I already connected mu web application for back end. So I don't know how to connect mobile app for it. please help me.
where should i implement this code.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.