I am new to SQL Server and i am trying to establish connection between Nodejs and SQL Server which is hosted on my Local Machine which is authenticated using Windows Authentication
Here is my Connection Configurations
const sql = require("mssql");
require("msnodesqlv8");
const conn = new sql.ConnectionPool({
database: "ApplicantsData",
server: "localhost",
driver: "msnodesqlv8",
options: {
trustedConnection: true,
TrustServerCertificate:true
}
});
conn.connect().then(() => {
//check
});
whenever i try to connect i got an error of
Failed to connect to localhost:1433 - certificate is not yet valid
i have searched for this type of error and i ensured that:
- TCP/IP enabled using SQL Server Configurations
- Enabled SQL Server Browsing
any solutions/fixes?