Hello World!
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
#!/usr/bin/node | |
const {tg_token, ws_token, ws_port, http_port} = require('../etc/credentials.js') | |
const Telegraf = require('telegraf') | |
const bot = new Telegraf(tg_token) | |
const Telegram = require('telegraf/telegram') | |
const tg = new Telegram(tg_token) | |
const WebSocket = require('ws') | |
const wss = new WebSocket.Server({port: ws_port}) | |
const wsc = new WebSocket('ws://localhost:3501/admin', {headers: {token: ws_token}}) |
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
var gulp = require('gulp') | |
var pug = require('gulp-pug') | |
var stylus = require('gulp-stylus') | |
var coffee = require('gulp-coffee') | |
gulp.task('css', function() { | |
gulp.src('index.styl') | |
.pipe(stylus()) | |
.pipe(gulp.dest('../public/css')) | |
}) |
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
var gulp = require('gulp') | |
var pug = require('gulp-pug') | |
var stylus = require('gulp-stylus') | |
var coffee = require('gulp-coffee') | |
gulp.task('css', function() { | |
gulp.src('index.styl') | |
.pipe(stylus()) | |
.pipe(gulp.dest('../public/css')) | |
}) |
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
var http = require('http'); | |
http.createServer(function (request, response) { | |
response.writeHead(200, {'Content-Type': 'text/plain'}); | |
response.end('Hello World\n'); | |
}).listen(3000); | |
console.log('Server running at http://localhost:3000/'); |