This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* expressのサーバ生成メソッドの実行 | |
* Webサーバの機能を参照するインスタンスをセット | |
*/ | |
var app = express(); | |
/** | |
* log4jsの読み込み | |
*/ | |
var log4js = require('log4js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "application-name", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "node app" | |
}, | |
"dependencies": { | |
"express": "3.0.0rc5", | |
"jade": "*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* log4js loggging sample | |
* @modal_soul | |
*/ | |
var log4js = require('log4js'); | |
log4js.configure({ | |
appenders: [{ | |
"type": "dateFile", | |
"filename": "logging.log", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// モジュールの読み込み | |
var util = require('util'); | |
url = require('url'); | |
http = require('http'); | |
// ダウンロードを実行する関数 | |
function download(urlStr) { | |
// URL文字列のパース | |
var options = url.parse(urlStr); |