_/home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/learnyounode/exer
cises/make_it_modular/solution/solution.js_ : var filterFn = require('./solution_filter.js')
var dir = process.argv[2]
var filterStr = process.argv[3] filterFn(dir, filterStr, function (err, list) {
if (err)
return console.error('There was an error:', err) list.forEach(function (file) {
console.log(file)
})
})
 _/home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/learnyounode/exer
cises/make_it_modular/solution/solution_filter.js_ : var fs = require('fs')
var path = require('path') module.exports = function (dir, filterStr, callback) { fs.readdir(dir, function (err, list) {
if (err)
return callback(err) list = list.filter(function (file) {
return path.extname(file) === '.' + filterStr
}) callback(null, list)
})
}

[freeCodeCamp] Start a Nodejs Server - Complete "Make it Modular"的更多相关文章

  1. 用issnode+IIS来托管NodeJs Server

    用issnode+IIS来托管NodeJs Server之一:安装篇 用issnode+IIS来托管NodeJs Server之二:移植 用issnode+IIS来托管NodeJs Server之三: ...

  2. week06 09 NodeJS Server as a RPCclient - jayson

    nodeserver端的rpcclient 来调用后端backendserver端定义的add等方法 2个server连通 Make NodeJs as a client - Npm jayson 用 ...

  3. nodejs server启动写法

    http://www.phpstudy.net/c.php/18720.html node不利用框架怎么实现对静态HTML.css.js的服务? 初学nodeJS,在使用nodejs构建静态文件服务器 ...

  4. nodejs server websocket

    var WebSocketServer = require('websocket').server; var http = require('http'); var server = http.cre ...

  5. Yslow on Nodejs server

    1. 目的:用yslow测试某个页面的性能 2. 需求:返回yslow测试后的数据,显示在页面 方法一. nodejs 需要把网址打包为har格式... 方法二. phantomjs 步骤: 1. 安 ...

  6. Modular Rails: The complete Guide to Modular Rails Applications 笔记

    fix SamuraiCRM/engines/core/test/dummy/config/routes 修改如下 Rails.application.routes.draw do mount Sam ...

  7. nodejs 配置服务自启动

    1安装包 输入以下命令,安装需要的包 npm install node-windows -g 2编写自启动js 在目标server.js目录下新建auto_start_nodejs.js文件,将以下j ...

  8. 阿里云部署nodejs服务器(windows)

    花了大半个月做的网站终于要上线了,周围的同学们很多都在使用阿里云的服务器,我也入手了一台.考虑到自己不是很适应ubuntu的命令行界面,于是买了个windows的,上网搜了一下,似乎都是用linux来 ...

  9. nginx 各类网站设置 (laravel , thinkphp , nodejs , https)

    基础部分设置 [root@centos ~]# vim /opt/nginx/conf/nginx.conf user www www;worker_processes auto;pid logs/n ...

随机推荐

  1. Sublime Text 3 个人使用总结

    待更新 Sublime Text 3\Packages\FileHeader\template\header

  2. 并发工具类(二)同步屏障CyclicBarrier

    前言   JDK中为了处理线程之间的同步问题,除了提供锁机制之外,还提供了几个非常有用的并发工具类:CountDownLatch.CyclicBarrier.Semphore.Exchanger.Ph ...

  3. Mac OS 修改hosts文件

    这里用得是 VI 编辑器修改 打开终端(应用程序——实用工具),运行: sudo vi /etc/hosts,此时屏幕上会提示你输入密码 打开 hosts 文件之后按 i 键进入插入模式(可理解为编辑 ...

  4. 掩膜操作手写+API(第二天)

    1.1首先是用到的理论知识: 上面是一个通用的公式,光知道上面写程序还是有点麻烦的,下面公式画的有点丑,可以表达我的观点. 1.2用到的知识点:可以边看程序边看用到的知识点: CV_Assert(); ...

  5. selenium+python自动化93-Chrome报错:Python is likely shutting down

    遇到问题 报错信息:sys.meta_path is None, Python is likely shutting down 1.我的环境: python 3.6 selenium 2.53.6 c ...

  6. Genymotion——VirtualBox cannot start virtual device

    提示"VirtualBox cannot start virtual device" 打开VirtualBox,想要在里面直接启动Genymotion模拟器,又出现错误,提示“Un ...

  7. 1.java生成随机不重复10位字符串

    package org.changneng.util; import java.util.Random; public class A { public static void main(String ...

  8. javascript 浮点数加减乘除计算会有问题, 整理了以下代码来规避这个问题

    /* * js数学计算 add by yan */ /** ** 加法函数,用来得到精确的加法结果 ** 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显.这个函数返回较 ...

  9. Select Case 的简单实现

    FOR %%f in (1,3,5,7,) do if errorlevel == %%f goto CASE%%f        echo                    ERROR      ...

  10. ios 给图片加文字

    - (UIImage*) drawText:(NSString*)text inImage:(UIImage*)image { //prepare image context UIGraphicsBe ...