Skip to content

Commit

Permalink
Merge pull request #11 from SorinGFS:dev
Browse files Browse the repository at this point in the history
moving utility functions to own repository zerodep
  • Loading branch information
SorinGFS authored Oct 15, 2022
2 parents 013b271 + fc342ff commit 5f55e29
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// DO NOT MODIFY - this is standard generic config index
// returns configs as ARRAY from the directories where it is requested
module.exports = (workdir, filter) => {
const fs = require('webaccess-base/fs');
const fn = require('webaccess-base/fn');
const fs = require('zerodep/node/fs');
const fn = require('zerodep/node/fn');
const enabled = require(fs.pathResolve(workdir, 'enabled'));
const sources = (paths) => {
if (paths && typeof paths === 'string') return [...require(fs.pathResolve(workdir, paths))];
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict';
// The application transfers the requests to the server according to the requested host.
const env = require('./config/env');
const fn = require('webaccess-base/fn');
const fn = require('zerodep/node/fn');
const app = require('express')();
const appConfig = require('./config/app');
const accessDb = require('./config/connections')((config) => config.database === appConfig.accessDbName)[0];
const configs = require('./config/servers')(() => true); // filter all
const servers = require('webaccess-base/servers')(configs);
const servers = require('webaccess-servers')(configs);
const httpParsers = require('webaccess-middlewares/http-parsers');
const handleError = require('webaccess-middlewares/http-errors');
const createError = require('http-errors');
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webaccess",
"version": "1.2.0",
"version": "1.2.1",
"description": "Access Management Reverse Proxy based on JWT.",
"main": "index.js",
"scripts": {
Expand All @@ -17,12 +17,13 @@
"license": "MIT",
"dependencies": {
"dotenv": "^8.2.0",
"express": "4.18.1",
"express": "4.18.2",
"express-http-proxy": "^1.6.3",
"pluralize": "^8.0.0",
"webaccess-actions": "1.1.4",
"webaccess-base": "1.1.4",
"webaccess-middlewares": "1.1.4"
"webaccess-actions": "1.1.5",
"webaccess-middlewares": "1.1.5",
"webaccess-servers": "1.1.5",
"zerodep": "1.0.0"
},
"devDependencies": {
"commander": "^8.2.0",
Expand Down
2 changes: 1 addition & 1 deletion server/proxy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// http://expressjs.com/en/4x/api.html#router.route
const router = require('express').Router();

const fs = require('webaccess-base/fs');
const fs = require('zerodep/node/fs');
const expressProxy = require('express-http-proxy');

// set express-http-proxy host and proxyOptions
Expand Down
2 changes: 1 addition & 1 deletion server/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
// https://expressjs.com/en/4x/api.html#express.router
const router = require('express').Router();
const fs = require('webaccess-base/fs');
const fs = require('zerodep/node/fs');

fs.dirs(__dirname).forEach((route) => router.use(`/${route}/`, require(`./${route}`)));

Expand Down

0 comments on commit 5f55e29

Please sign in to comment.