Skip to content

Instantly share code, notes, and snippets.

View LeeHyungGeun's full-sized avatar

LeeHyungGeun LeeHyungGeun

  • NAVER
  • Korea
View GitHub Profile
@LeeHyungGeun
LeeHyungGeun / app.js
Created July 6, 2013 06:43
Single Page Application with Angular.js, Node.js(Socket.IO) and MongoDB (MongoJS Module) Refer: http://www.phloxblog.in/single-page-application-angular-js-node-js-mongodb-mongojs-module/
var http = require('http');
var express = require('express');
var path = require('path');
var app = express();
var server = http.createServer(app);
var databaseUrl = 'sampledb';
var collections = ['things'];
var db = require('mongojs').connect(databaseUrl, collections);
var mongojs = require('mongojs');
var io = require('socket.io').listen(server);
@LeeHyungGeun
LeeHyungGeun / angularjsDemo03_.idea_.name
Last active June 19, 2021 19:07
Single Page App : Node.js + AngularJS + MongoDB
angularjsDemo03
@LeeHyungGeun
LeeHyungGeun / nodejs with socketio_app.js
Last active April 20, 2022 19:25
Server-Side: nodejs with socket.io Client-Side: express3-handlebars DB: mongodb
var http = require('http');
var express = require('express');
var app = express();
var exphbs = require('express3-handlebars');
var path = require('path');
var server = http.createServer(app);
var io = require('socket.io').listen(server);
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:30000/people');