Skip to content

Commit

Permalink
refactor: migrate to use latest dependencies api
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed May 21, 2019
1 parent 76a7579 commit 6f8a513
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 1,286 deletions.
5 changes: 3 additions & 2 deletions examples/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const _ = require('lodash');
const async = require('async');
const mongoose = require('mongoose');
// mongoose.set('debug', true);
const { start } = require('@lykmapipo/express-common');
const { Jurisdiction } = require('@codetanzania/majifix-jurisdiction');
const {
Priority,
Expand Down Expand Up @@ -67,9 +68,9 @@ function boot() {
});

/* fire the app */
app.start(function (error, env) {
start(function (error, env) {
console.log(
`visit http://0.0.0.0:${env.PORT}/v${apiVersion}/priorities`
`visit http://0.0.0.0:${env.PORT}/${apiVersion}/priorities`
);
});

Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
/* dependencies */
const path = require('path');
const _ = require('lodash');
const app = require('@lykmapipo/express-common');
const { app, mount } = require('@lykmapipo/express-common');


/* declarations */
const pkg = require(path.join(__dirname, 'package.json'));
const fields = [
`${__dirname}/package.json`,
'name',
'description',
'version',
Expand Down Expand Up @@ -79,7 +80,7 @@ Object.defineProperty(exports, 'app', {
get() {

/* bind priority router */
app.mount(router);
mount(router);
return app;
}
});
Loading

0 comments on commit 6f8a513

Please sign in to comment.