Skip to content

Instantly share code, notes, and snippets.

View jin3lee's full-sized avatar

Joseph Lee jin3lee

View GitHub Profile
@jin3lee
jin3lee / 0_reuse_code.js
Created January 10, 2017 18:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jin3lee
jin3lee / default app.js
Created January 8, 2017 04:43
what should be inside app.js for server to run by default
var express = require('express'); // require express module
var app = express(); // references and creates a new express app
var serv = require('http').Server(app); //require http module with express application info
app.get('/', function(req, res) {
res.sendFiles(__dirname + '/client/index.html');
});
app.use('/client', express.static(__dirname + '/client'));
serv.listen(2000);
console.log("Server started.");
@jin3lee
jin3lee / installing socket.snippets
Last active January 10, 2017 18:21
terminal commands to install socket.io & express
npm install socket.io
npm install express