I'm trying to connect to my local database and these are the parameters I have:
var config = {
user: 'Eduard-PC\EdwarD',
password: '',
server: 'EDUARD-PC\SQLEXPRESS',
database: 'nodejslogin'
};
I get the following error:
E: \ Pages \ connn> node server.js Server is running .. {Error: Failed to connect to EDUARD-PCSQLEXPRESS: 1433 - getaddrinfo ENOTFOUND E DUARD-PCSQLEXPRESS at Connection.tedious.once.err (E: \ Pages \ connn \ node_modules \ mssql \ lib \ tedi ous.js: 216: 17) at Connection.g (events.js: 292: 16) at emitOne (events.js: 96: 13) at Connection.emit (events.js: 188: 7) at Connection.socketError (E: \ Pages \ connn \ node_modules \ tedious \ lib \ connect ion.js: 699: 14) at E: \ Pages \ connn \ node_modules \ tedious \ lib \ connection.js: 590: 25 at E: \ Pages \ connn \ node_modules \ tedious \ lib \ connector.js: 68: 18 at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js: 62: 16) at GetAddrInfoReqWrap.onlookupall [as oncomplete] (dns.js: 89: 17) code: 'ESOCKET', originalError: {ConnectionError: Failed to connect to EDUARD-PCSQLEXPRESS: 1433 - getaddrinf o ENOTFOUND EDUARD-PCSQLEXPRESS at ConnectionError (E: \ Pages \ connn \ node_modules \ tedious \ lib \ errors.js: 1 2:12) at Connection.socketError (E: \ Pages \ connn \ node_modules \ tedious \ lib \ conn ection.js: 699: 30) at E: \ Pages \ connn \ node_modules \ tedious \ lib \ connection.js: 590: 25 at E: \ Pages \ connn \ node_modules \ tedious \ lib \ connector.js: 68: 18 at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js: 62: 16) at GetAddrInfoReqWrap.onlookupall [as oncomplete] (dns.js: 89: 17) message: 'Failed to connect to EDUARD-PCSQLEXPRESS: 1433 - getaddrinfo ENOTF OUND EDUARD-PCSQLEXPRESS ', code: 'ESOCKET'}, name: 'ConnectionError'} {ConnectionError: Connection is closed. at Request._query (E: \ Pages \ connn \ node_modules \ mssql \ lib \ base.js: 1300: 37) at Request._query (E: \ Pages \ connn \ node_modules \ mssql \ lib \ tedious.js: 497: 11 ) at Request.query (E: \ Pages \ connn \ node_modules \ mssql \ lib \ base.js: 1243: 12) at E: \ Pages \ connn \ server.js: 25: 17 at _poolCreate.then.catch.err (E: \ Pages \ connn \ node_modules \ mssql \ lib \ base. js: 270: 7) code: 'ECONNCLOSED', name: 'ConnectionError'}
I think it's because I'm left like this:
I do not recognize the \