22 lines
490 B
JavaScript
22 lines
490 B
JavaScript
require('dotenv').config();
|
|
const express = require('express');
|
|
var https = require('https');
|
|
var bodyParser = require('body-parser');
|
|
const server = express();
|
|
var fs = require('fs');
|
|
var readline = require('readline');
|
|
|
|
const pg = require('pg')
|
|
|
|
const client = new pg.Client({
|
|
user: 'api',
|
|
host: '192.168.1.110',
|
|
database: 'ubm',
|
|
password: 'qqqx53!028',
|
|
port: 5433,
|
|
})
|
|
client.connect()
|
|
client.query('SELECT 1', (err, res) => {
|
|
console.log(err, res)
|
|
client.end()
|
|
}) |