-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
556 additions
and
435 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,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM mhart/alpine-node:6 | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm install | ||
RUN echo $'#!/bin/sh\n\ | ||
sed -i "s/TELEGRAM_TOKEN/$TELEGRAM_TOKEN/g" /app/examples/*\n\ | ||
sed -i "s/CHAT_ID_1/$CHAT_ID/g" /app/examples/*\n\ | ||
sed -i "s/CHAT_ID_2/$CHAT_ID/g" /app/examples/*\n\ | ||
sed -i "s/CHAT_ID/$CHAT_ID/g" /app/examples/*\n\ | ||
files=$(find /app/examples -type f)\n\ | ||
for i in $files\n\ | ||
do\n\ | ||
node $i\n\ | ||
sleep 5\n\ | ||
done'\ | ||
>> /app/start.sh | ||
RUN chmod +x /app/start.sh | ||
CMD ["/bin/sh", "/app/start.sh"] |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ A [Telegram][0] transport for [winston][1]. | |
[![Coverage Status](https://coveralls.io/repos/github/ivanmarban/winston-telegram/badge.svg?branch=master)](https://coveralls.io/github/ivanmarban/winston-telegram?branch=master) | ||
[![dependencies Status](https://david-dm.org/ivanmarban/winston-telegram/status.svg)](https://david-dm.org/ivanmarban/winston-telegram) | ||
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) | ||
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SJLW6PTHQQNBS) | ||
|
||
## winston-telegram@2 | ||
|
||
|
@@ -53,7 +54,18 @@ String template is based on named arguments: | |
|
||
## Examples | ||
|
||
Take a look at the [examples][3] | ||
Follow below steps to run the examples: | ||
|
||
``` sh | ||
$ git clone [email protected]:ivanmarban/winston-telegram.git -b master --single-branch | ||
$ npm install | ||
``` | ||
|
||
Replace `TELEGRAM_TOKEN` and `CHAT_ID` with appropiate values, then run whatever example you want: | ||
|
||
``` sh | ||
$ node examples/default-logger.js | ||
``` | ||
|
||
[0]: https://telegram.org/ | ||
[1]: https://github.com/flatiron/winston | ||
|
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
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
Oops, something went wrong.