Skip to content
Snippets Groups Projects
Commit 9a95dcee authored by Quentin CHEVALIER's avatar Quentin CHEVALIER
Browse files

Minor fixes & tests tsc

parent e1a9ea35
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,6 @@ bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
......@@ -69,6 +66,7 @@ typings/
# Generated files
doc/
build/
tsbuild/
# Config files
ldap_credentials.json
......
......@@ -10,10 +10,10 @@ import fs from 'fs';
import path from 'path';
import colors from 'colors';
import dotenv from 'dotenv';
dotenv.config({ path: path.resolve("/"+__dirname, '..', '..', '..', './.env') });
dotenv.config({ path: path.resolve(__dirname, '..', '..', '..', '..', './.env') });
// Point central ; tous les champs de la BDD sont 'cachés' dans config.json et pas visibles directement
let path_config = path.resolve("/"+__dirname, '..', '..', '..', './ldap_config.json');
let path_config = path.resolve(__dirname, '..', '..', '..', '..', './ldap_config.json');
console.log(colors.cyan("Loading LDAP config file from "+path_config));
export const ldapConfig = JSON.parse(fs.readFileSync(path_config).toString());
......
var Group = require("../../tsbuild/src/ldap/export/group");
var Group = require("../../tsbuild/src/ldap/export/group").Group;
console.log(Group);
console.log(Group.peek("faerix"));
Group.peek("faerix").then(dat => { console.log(dat); });
var User = require("../../tsbuild/src/ldap/export/group");
\ No newline at end of file
......@@ -14,9 +14,9 @@ const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const colors_1 = __importDefault(require("colors"));
const dotenv_1 = __importDefault(require("dotenv"));
dotenv_1.default.config({ path: path_1.default.resolve("/" + __dirname, '..', '..', '..', './.env') });
dotenv_1.default.config({ path: path_1.default.resolve(__dirname, '..', '..', '..', './.env') });
// Point central ; tous les champs de la BDD sont 'cachés' dans config.json et pas visibles directement
let path_config = path_1.default.resolve("/" + __dirname, '..', '..', '..', '..', './ldap_config.json');
let path_config = path_1.default.resolve(__dirname, '..', '..', '..', '..', './ldap_config.json');
console.log(colors_1.default.cyan("Loading LDAP config file from " + path_config));
exports.ldapConfig = JSON.parse(fs_1.default.readFileSync(path_config).toString());
// Override config server from environment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment