Skip to content

Instantly share code, notes, and snippets.

View harishankards's full-sized avatar

Harishankar Ayandev harishankards

View GitHub Profile
@harishankards
harishankards / default
Created July 5, 2018 19:02
SB server config
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name studentburger.com;
ssl on;
# Use certificate and key provided by Let's Encrypt:
@harishankards
harishankards / sb-app.js
Last active July 4, 2018 12:26
To debug static middleware serving wrong routes to API
/**
* Module dependencies.
*/
const express = require('express');
const compression = require('compression');
const session = require('express-session');
const bodyParser = require('body-parser');
const logger = require('morgan');
const chalk = require('chalk');
const errorHandler = require('errorhandler');
@harishankards
harishankards / backend-app.js
Last active July 4, 2018 09:53
To debug socket.io implementation with node and Vue
const app = express();
var server = require('http').Server(app);
const io = require('socket.io')(server);
io.on('connection', function(socket){
console.log("---------------------------------------------------------")
console.log('An user connected');
console.log("---------------------------------------------------------")