随笔分类 -  Node.js

上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要:hapi is a rock solid server framework for Node.js. Its focus on modularity and configuration-over-convention makes it the perfect match for any size d 阅读全文
posted @ 2016-02-27 17:04 Zhentiw
摘要:// Save datavar storage = require('node-persist');storage.init();var people= require('./people.json');people.forEach( (person)=>{ storage.setItem(per... 阅读全文
posted @ 2015-12-26 18:10 Zhentiw
摘要:Using mocha: "devDependencies": { "should": "^5.2.0", "supertest": "^0.15.0" } process.env.A127_ENV = 'test'; var should = require('should'); var requ 阅读全文
posted @ 2015-12-18 15:53 Zhentiw
摘要:Many websites have more than just simple static content. Dynamic content which is rendered by JavaScript requires browser to be able to scrape data. T... 阅读全文
posted @ 2015-09-04 00:10 Zhentiw
摘要:When web scraping, you'll often want to get more than just one page of data. Xray supports pagination by finding the "next" or "more" button on each p... 阅读全文
posted @ 2015-08-22 16:47 Zhentiw
摘要:Node makes scraping images off the web extremely easy using a couple handy packages: Xray and Download. Simple scrape the img tag, grab all the src at... 阅读全文
posted @ 2015-08-14 20:31 Zhentiw
摘要:Node and Xray have made web scraping a really simple affair. This video introduces you to the process of scraping all of the "a" tags off of a url and... 阅读全文
posted @ 2015-08-13 16:46 Zhentiw
摘要:>> node>>fs.readFile('finnish.txt', function(err,data){ console.log(data);});// Output string is not what we want>>fs.readFile('finnish.txt', funct... 阅读全文
posted @ 2015-06-18 01:03 Zhentiw
摘要:timeoutLog.js:var apiCheckFactory = require('api-check');var myCheck = apiCheckFactory();module.exports = timeoutLog;var api = [ myCheck.number, myC... 阅读全文
posted @ 2015-06-09 17:26 Zhentiw
摘要:shows how to enable features in your pm2 config file that allow you to prevent runaway apps from bringing your server down. Setting max memory used, n... 阅读全文
posted @ 2015-05-13 23:31 Zhentiw
摘要:learn how to pass environment variables to your node.js app using the pm2 config file. This is useful for setting options inside your app such as prod... 阅读全文
posted @ 2015-05-05 02:34 Zhentiw
摘要:Aadd watch to the config.json file:{ "apps": [{ "name": "App1", "script": "app1/server.js", "log_file": "log/app1.log", "error_file": "lo... 阅读全文
posted @ 2015-04-29 17:12 Zhentiw
摘要:Add config for app's log and error log for PM2.{ "apps": [{ "name": "App1", "script": "app1/server.js", "log_file": "log/app1.log", "erro... 阅读全文
posted @ 2015-04-29 17:11 Zhentiw
摘要:In this lesson, you will learn how to configure node apps using pm2 and a json config file.Let's say there are tow node apps: app1, app2.What we want ... 阅读全文
posted @ 2015-04-29 16:05 Zhentiw
摘要:What we want is when the server side Node.js files have been changed, we want to use browserify to bundle all file and output just one file and later ... 阅读全文
posted @ 2015-03-15 16:51 Zhentiw
摘要:npm runallows you to configure scripts inside of yourpackage.jsonfile which can access locally installed node packages. If you're comfortable with thi... 阅读全文
posted @ 2015-03-15 15:59 Zhentiw
摘要:It is some times convenient, even necessary, to make use of a module that you are working on before it has been published to the node package manager ... 阅读全文
posted @ 2015-03-14 23:04 Zhentiw
摘要:Sometime you might want to dump some tables or database from the mysql database. If you using heroku, you can not find the graphy interface like phpMy... 阅读全文
posted @ 2015-02-28 16:28 Zhentiw
摘要:json-server makes it extremely easy to setup robust JSON apis to use for demos and proof of concepts. John walks you through the process of using pre-... 阅读全文
posted @ 2015-01-12 23:20 Zhentiw
摘要:Currently, the server.js is going way too long. In the real world application, it is likely that we are going to deal with more routers, whichi means ... 阅读全文
posted @ 2015-01-02 22:18 Zhentiw

上一页 1 ··· 4 5 6 7 8 9 10 下一页