Skip to content

Commit

Permalink
feat: allow Framework to override interfaces
Browse files Browse the repository at this point in the history
mvegter committed Apr 22, 2020
1 parent c368b20 commit 623181d
Showing 2 changed files with 29 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/application/index.js
Original file line number Diff line number Diff line change
@@ -16,8 +16,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const WebServer = require('../framework/http');
const { Server } = require('./interfaces');
const implementations = require('../framework');

module.exports = {
server: new WebServer(),
const interfaces = {
server: new Server(),
};

module.exports = Object.assign({}, interfaces, implementations);
23 changes: 23 additions & 0 deletions lib/framework/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* This file is part of the ALICE Electronic Logbook v2, also known as Jiskefet.
* Copyright (C) 2020 Stichting Hogeschool van Amsterdam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const WebServer = require('./http');

module.exports = {
server: new WebServer(),
};

0 comments on commit 623181d

Please sign in to comment.