Commit 06c56b14 authored by a001188's avatar a001188
Browse files

Some functions works

parent 4d14bd94
.config.json
\ No newline at end of file
routes/config.js
......@@ -17,10 +17,6 @@ var users = require('./routes/users');
var app = express();
const winston = require('winston');
var fs = require('fs'),
configPath = '.config.json';
var parsed = JSON.parse(fs.readFileSync(configPath, 'UTF-8'));
exports.storageConfig=parsed;
// view engine setup
app.set('views', path.join(__dirname, 'views'));
......
var express = require('express');
var router = express.Router();
const pg = require('pg');
const jQuery = require('jquery');
const path = require('path');
const connectionString = process.env.DATABASE_URL || 'postgres://jasper.u:Me4sgyAp@postgresql-utv.smhi.se:5432/jasper';
const config = require('./config');
const pg = require('pg');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
router.post('/types', (req, res, next) => {
......
var express = require('express');
var router = express.Router();
const pg = require('pg');
const jQuery = require('jquery');
const path = require('path');
var options = require('./options');
//var dburl= options.storageConfig.DBMS + "://" + options.storageConfig.USER + ":" + options.storageConfig.PASSWORD + "@" + options.storageConfig.HOST + ":" + options.storageConfig.POSRT + "://" + options.storageConfig.DATABASE;
const connectionString = process.env.DATABASE_URL || 'postgres://jasper.u:Me4sgyAp@postgresql-utv.smhi.se:5432/jasper';
//const connectionString = process.env.DATABASE_URL || dburl;
const pg = require('pg');
const config = require('./config');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
router.post('/enterprise_service/list', (req, res, next) => {
var pool = new pg.Pool({
......
module.exports.storageConfig='postgres://jasper.u:Me4sgyAp@postgresql-utv.smhi.se:5432/jasper';
var express = require('express');
var router = express.Router();
const winston = require('winston');
//const rootpath = '/cmdb/api/v1';
const pg = require('pg');
const path = require('path');
const connectionString = process.env.DATABASE_URL || 'postgres://jasper:a001188@localhost:5432/jasper';
const config = require('./config');
const pg = require('pg');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
/* GET home page. */
......
var express = require('express');
var express = require('express');
var router = express.Router();
const pg = require('pg');
const jQuery = require('jquery');
const path = require('path');
const connectionString = process.env.DATABASE_URL || 'postgres://jasper.u:Me4sgyAp@postgresql-utv.smhi.se:5432/jasper';
const config = require('./config');
const pg = require('pg');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
router.post('/family_type', (req, res, next) => {
var pool = new pg.Pool({
......
var express = require('express');
var router = express.Router();
const pg = require('pg');
const jQuery = require('jquery');
const path = require('path');
const connectionString = process.env.DATABASE_URL || 'postgres://jasper.u:Me4sgyAp@postgresql-utv.smhi.se:5432/jasper';
//const connectionString = process.env.DATABASE_URL || 'postgres://metrix:a001188@localhost:5432/metrix';
const config = require('./config');
const pg = require('pg');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
router.get('/list/nodes/:centralNode', (req, res, next) => {
var pool = new pg.Pool({
......
var express = require('express');
var router = express.Router();
const pg = require('pg');
const jQuery = require('jquery');
const path = require('path');
const connectionString = process.env.DATABASE_URL || 'postgres://jasper.u:Me4sgyAp@postgresql-utv.smhi.se:5432/jasper';
const config = require('./config');
const pg = require('pg');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
router.post('/types', (req, res, next) => {
......
var express = require('express');
var express = require('express');
var router = express.Router();
const pg = require('pg');
const jQuery = require('jquery');
const path = require('path');
const connectionString = process.env.DATABASE_URL || 'postgres://jasper.u:Me4sgyAp@postgresql-utv.smhi.se:5432/jasper';
const config = require('./config');
const pg = require('pg');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
router.post('/family_types', (req, res, next) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment