#Seminar
실습이 있는 세미나의 실습 자료입니다.
- Redis 데이터베이스 - http://redis.io/
- Redis 데이터베이스 윈도 버전 - https://github.com/MSOpenTech/redis
- Redis 데이터베이스 윈도 다운 - https://github.com/dmajkic/redis/downloads
- Node.js redis 모듈 - https://github.com/mranney/node_redis
- MongoDB - http://www.mongodb.org/
- Node.js mongojs 모듈 - https://github.com/gett/mongojs
- Putty - http://www.chiark.greenend.org.uk/~sgtatham/putty/
- FileZilla - http://filezilla-project.org/
// 기본 함수를 추출합니다.
var parse = require('express/node_modules/cookie').parse;
var parseSigned = require('express/node_modules/connect/lib/utils').parseSignedCookies;
var parseCookie = function (cookie) {
return parseSigned(parse(cookie), 'your secret here')
};
exports.active = function (everyauth, db) {
// EveryAuth 모듈의 기본 설정을 합니다.
var auth = everyauth.password.loginWith('login');
everyauth.everymodule.userPkey('_id');
everyauth.everymodule.findUserById(function (id, callback) {
db.users.findOne({
_id: db.ObjectId(id)
}, function (error, user) {
callback(error, user);
});
});
// 로그아웃 설정
everyauth.everymodule.logoutPath('/logout');
everyauth.everymodule.logoutRedirectPath('/login');
// 가입 설정
auth.registerView('register');
auth.getRegisterPath('/register');
auth.postRegisterPath('/register');
auth.extractExtraRegistrationParams(function (request) { });
auth.validateRegistration(function (userAttribute, errors) { });
auth.registerUser(function (userAttribute) { });
auth.registerSuccessRedirect('/');
// 로그인 설정
auth.loginView('login');
auth.getLoginPath('/login');
auth.postLoginPath('/login')
auth.authenticate(function (email, password) { });
auth.loginSuccessRedirect('/');
};
-
Coffee - https://googledrive.com/host/0B-OZJ2a4X20_amlOMTdFVHA4MEE/Coffee.html
-
Jade - https://googledrive.com/host/0B-OZJ2a4X20_amlOMTdFVHA4MEE/Jade.html
-
Stylus - https://googledrive.com/host/0B-OZJ2a4X20_amlOMTdFVHA4MEE/Stylus.html
-
JadeAndStylus - https://googledrive.com/host/0B-OZJ2a4X20_amlOMTdFVHA4MEE/JadeAndStylus.html