title: how to connect to a oracle 12C database in SYSOPER or SYSDBA in PRELIM_AUTH mode using node.js
body: <p>I am trying to start the server from my node.js application using npm's oracledb package. But In order to do that I need to connect to the database in PRELIM_AUTH mode with SYSOPER or SYSDBA privileges.</p>
  
  <p>Below is the sample code:</p>
  
  <pre><code>var oracledb = require('oracledb');
  var dbConfig = require('./dbconfig.js');
  
  oracledb.getConnection(
    {
      user          : dbConfig.user,
      password      : dbConfig.password,
      connectString : dbConfig.connectString
    },
    async function(err, connection) {
      if (err) {
        console.error(err.message);
        return;
      }
      console.log('Connection was successful!');
      await connection.startup();
      connection.close(
        function(err) {
          if (err) {
            console.error(err.message);
            return;
          }
        });
    });
  </code></pre>