Skip to content

Commit 9e64688

Browse files
committed
Update codebase
1 parent b2136cf commit 9e64688

File tree

20 files changed

+273
-370
lines changed

20 files changed

+273
-370
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
language: node_js
22
node_js:
3-
- '4.2'
4-
- '0.11'
5-
- '0.10'
3+
- '6'
4+
- '4'
65
before_deploy:
76
- mv .openshift/gitignore .gitignore
87
deploy:

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

HACKING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Before proceeding any further, read the following documents:
44

5-
1. [CONTRIBUTING.md][contrib]: contributing source code
6-
1. [CODE\_OF\_CONDUCT.md][coc]: code of conduct
7-
1. [LICENSE][license]: software license
5+
1. [contributing source code][contrib]
6+
1. [code of conduct][coc]
7+
1. [software license][license]
88

9-
[contrib]:https://github.com/forfuturellc/mmtc-ke/blob/master/CONTRIBUTING.md
10-
[coc]:https://github.com/forfuturellc/mmtc-ke/blob/master/CODE_OF_CONDUCT.md
11-
[license]:https://github.com/forfuturellc/mmtc-ke/blob/master/LICENSE
9+
[contrib]:https://github.com/forfuturellc/workflow/blob/master/CONTRIBUTING.md
10+
[coc]:https://github.com/forfuturellc/workflow/blob/master/CODE_OF_CONDUCT.md
11+
[license]:https://github.com/forfuturellc/mmtc-ke/blob/master/LICENSE.txt
1212

1313

1414
## introduction:
File renamed without changes.

app.js

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
1+
/**
2+
* The MIT License (MIT)
3+
* Copyright (c) 2016 GochoMugo <mugo@forfuture.co.ke>
4+
* Copyright (c) 2016 Forfuture, LLC <we@forfuture.co.ke>
5+
*
6+
* Mobile Money Transaction Costs (MMTC).
7+
*/
8+
9+
110
// built-in modules
2-
var path = require('path');
11+
const path = require('path');
312

413

514
// npm-installed modules
6-
var bodyParser = require('body-parser');
7-
var config = require('config');
8-
var Debug = require('debug');
9-
var express = require('express');
10-
var nunjucks = require('nunjucks');
15+
const bodyParser = require('body-parser');
16+
const config = require('config');
17+
const Debug = require('debug');
18+
const express = require('express');
19+
const nunjucks = require('nunjucks');
1120

1221

1322
// own modules
14-
var engine = require('./engine');
15-
var routes = require('./routes');
16-
var webConfig = require('./web/config');
17-
var pkg = require('./package.json');
23+
const engine = require('./engine');
24+
const routes = require('./routes');
25+
const webConfig = require('./web/config');
26+
const pkg = require('./package.json');
1827

1928

2029
// module variables
21-
var app = express();
22-
var debug = Debug('mmtc-ke:app');
23-
var logger = engine.clients.getLogger();
24-
var nunjucksEnv;
30+
const app = express();
31+
const debug = Debug('mmtc-ke:app');
32+
const logger = engine.clients.getLogger();
33+
let nunjucksEnv;
34+
const devmode = app.get("env") === "development";
2535

2636

2737
debug('initializing engine');
@@ -32,6 +42,7 @@ debug('configuring nunjucks');
3242
nunjucksEnv = nunjucks.configure('web', {
3343
autoescape: true,
3444
express: app,
45+
noCache: devmode ? true : false,
3546
});
3647

3748

@@ -58,7 +69,7 @@ app.use(bodyParser.json());
5869
app.use(bodyParser.urlencoded({ extended: false }));
5970

6071

61-
debug('mouting middleware for serving static files');
72+
debug('mounting middleware for serving static files');
6273
routes.utils.webMiddleware(app, webConfig);
6374

6475

bower.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
"private": true,
1717
"ignore": [],
1818
"dependencies": {
19-
"font-awesome": "^4.5.0",
20-
"jquery": "^2.2.1",
21-
"bootstrap": "^3.3.6",
22-
"animate.css": "^3.5.1"
19+
"font-awesome": "^4.6.3",
20+
"jquery": "^3.1.0",
21+
"bootstrap": "^3.3.7",
22+
"animate.css": "^3.5.2"
23+
},
24+
"resolutions": {
25+
"jquery": "1.9.1 - 3"
2326
}
2427
}

config/default.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1+
/**
2+
* The MIT License (MIT)
3+
* Copyright (c) 2016 GochoMugo <mugo@forfuture.co.ke>
4+
* Copyright (c) 2016 Forfuture, LLC <we@forfuture.co.ke>
5+
*
6+
* Application configurations.
7+
*/
8+
9+
110
// module variables
2-
var config = {};
11+
const config = {};
312

413

514
// server configuration
615
config.server = {};
716
config.server.port = process.env.OPENSHIFT_NODEJS_PORT || 8090;
8-
config.server.ip = process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0';
17+
config.server.ip = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';
918

1019

1120
// site configuration
@@ -21,5 +30,5 @@ config.site.author.name = 'Forfuture LLC';
2130
config.site.author.url = 'http://forfuture.co.ke';
2231

2332

24-
// export the configuration
33+
// export the configurations
2534
exports = module.exports = config;

engine/clients.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* The MIT License (MIT)
3-
* Copyright (c) 2016 Forfuture LLC
3+
* Copyright (c) 2016 GochoMugo <mugo@forfuture.co.ke>
4+
* Copyright (c) 2016 Forfuture, LLC <we@forfuture.co.ke>
45
*
56
* Client to support services.
67
*/
@@ -12,7 +13,7 @@ exports = module.exports = {
1213

1314

1415
// npm-installed modules
15-
var winston = require('winston');
16+
const winston = require('winston');
1617

1718

1819
/**

engine/errors.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
/**
22
* The MIT License (MIT)
3-
* Copyright (c) 2016 Forfuture LLC
3+
* Copyright (c) 2016 GochoMugo <mugo@forfuture.co.ke>
4+
* Copyright (c) 2016 Forfuture, LLC <we@forfuture.co.ke>
45
*
5-
* Error handling
6+
* Custom errors.
67
*/
78

89

910
// npm-installed modules
10-
var errors = require('common-errors');
11+
const errors = require('common-errors');
1112

1213

1314
// module variables
14-
var define = errors.helpers.generateClass;
15+
const define = errors.helpers.generateClass;
1516

1617

1718
exports = module.exports = {

0 commit comments

Comments
 (0)