Skip to content

Instantly share code, notes, and snippets.

#!/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}})
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'))
})
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'))
})
@mabel
mabel / server.js
Created April 10, 2018 18:42
Simpliest http-server via NodeJS
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/');
@mabel
mabel / README.md
Last active September 25, 2017 14:02
Переменные в JavaScript

Hello World!