This repository has been archived by the owner on Mar 21, 2018. It is now read-only.
forked from viktor-br/fakesmpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fakesmpp can now be used as a node package.
- Loading branch information
Laci Szucs
authored and
Laci Szucs
committed
Jun 7, 2016
1 parent
949a136
commit 6f1deb6
Showing
7 changed files
with
158 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const _ = require('lodash'); | ||
const optimist = require('optimist'); | ||
const options = require('./options'); | ||
const argv = _.reduce(cliOptions, (optimist, option, name) => { | ||
return optimist.options(name, option); | ||
}, optimist); | ||
|
||
if (argv.help) { | ||
optimist.showHelp(); | ||
return; | ||
} | ||
|
||
module.exports = require('smpp').spawnServer(argv); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = require('./smpp'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict'; | ||
|
||
const winston = require('winston'); | ||
const logger = new (winston.Logger)({ | ||
transports: [ | ||
new (winston.transports.Console)({ | ||
json: false, | ||
timestamp: true | ||
}) | ||
] | ||
}); | ||
|
||
module.exports = logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module.exports = Object.freeze({ | ||
port: { | ||
default: 2775, | ||
alias: 'p', | ||
describe: 'Port which server listen to.' | ||
}, | ||
ddmin: { | ||
default: 0, | ||
describe: 'Minimum delay after submit_sm requested and deliver_sm request to ESME.' | ||
}, | ||
ddmax: { | ||
default: 0, | ||
describe: 'Maximum delay after submit_sm requested and deliver_sm request to ESME.' | ||
}, | ||
statuses: { | ||
alias: 's', | ||
default: 'delivered', | ||
describe: "Comma separated list of statuses, server send in deliver_sm request to ESME." | ||
}, | ||
auth: { | ||
default: 'user:pass', | ||
describe: 'Comma separated auth credentials in format [system_id]:[password]' | ||
}, | ||
help: { | ||
default: false, | ||
alias: 'h', | ||
describe: 'Current help.' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters