随笔分类 -  Node.js

上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要:Sometimes you are one or two lines short from finding the cause of the error in the stack trace but you can't because Nodejs displays only a handful o 阅读全文
posted @ 2019-01-25 20:32 Zhentiw 阅读(278) 评论(0) 推荐(0) 编辑
摘要:Sometimes, you might want to convert a JavaScript function that accepts a callback to one that returns a Promiseobject. This lesson shows how to manua 阅读全文
posted @ 2018-12-07 19:16 Zhentiw 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Downloading and saving a file is a common scenario when building out your web application. Using Express, you can either trigger a download from an ex 阅读全文
posted @ 2018-11-08 05:51 Zhentiw 阅读(233) 评论(0) 推荐(0) 编辑
摘要:Given a epxress application and an svg template, we want to draw some text, date onto it and convert it to pdf as output. Code: Github 阅读全文
posted @ 2018-11-06 16:27 Zhentiw 阅读(891) 评论(0) 推荐(0) 编辑
摘要:Npm by default uses global values when initializing a new package.json file. Learn how to set your own global default values by command line or editin 阅读全文
posted @ 2018-10-22 19:43 Zhentiw 阅读(142) 评论(0) 推荐(0) 编辑
摘要:We'll read a csv file in node.js both synchronously, and asynchronously. The file we're reading is a plain text, utf8 file - but you can also use fs.r 阅读全文
posted @ 2018-10-21 03:18 Zhentiw 阅读(314) 评论(0) 推荐(0) 编辑
摘要:In node.js, you can require fs, and then call fs.writeFile with the filename, and data to write to that file (as a string or a buffer). That will over 阅读全文
posted @ 2018-10-21 03:13 Zhentiw 阅读(748) 评论(0) 推荐(0) 编辑
摘要:Winston is a popular logging library for NodeJS which allows you to customise the output, as well as different logging targets. This lesson covers con 阅读全文
posted @ 2018-07-11 18:32 Zhentiw 阅读(1078) 评论(0) 推荐(0) 编辑
摘要:Github To stop having to change configuration settings in production code and to stop secure information like usernames and password being stored in s 阅读全文
posted @ 2018-07-11 18:16 Zhentiw 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Use can use colour and styles to make it easy to spot errors and group common functionality into blocks when viewing a NodeJS console. This lesson wil 阅读全文
posted @ 2018-07-10 18:34 Zhentiw 阅读(168) 评论(0) 推荐(0) 编辑
摘要:High availability apps require that no distinction be made between local and remote services. Attached resources should be accessed by environment var 阅读全文
posted @ 2018-03-13 20:49 Zhentiw 阅读(240) 评论(0) 推荐(0) 编辑
摘要:Storing configuration in files instead of the environment has many downsides, including mistakenly checking in the wrong configuration in the wrong en 阅读全文
posted @ 2018-03-13 20:43 Zhentiw 阅读(186) 评论(0) 推荐(0) 编辑
摘要:In this lesson we create a new Express web server app for handling file uploads and persisting them to the filesystem. We will walk through using the 阅读全文
posted @ 2017-10-12 23:52 Zhentiw 阅读(340) 评论(0) 推荐(0) 编辑
摘要:When we want to update our package we need to do a few things: pull latest from our git remote, bump the npm version and git tag, push to our remote, 阅读全文
posted @ 2017-09-29 02:32 Zhentiw 阅读(171) 评论(0) 推荐(0) 编辑
摘要:In this lesson we will publish our package. We will first add a prepublish script that runs our buildscript; this will ensure the built folder gets ad 阅读全文
posted @ 2017-09-29 02:28 Zhentiw 阅读(305) 评论(0) 推荐(0) 编辑
摘要:We will import our newly published package into a new project locally to make sure everything is working as expected. We can do this locally before pu 阅读全文
posted @ 2017-09-29 02:22 Zhentiw 阅读(199) 评论(0) 推荐(0) 编辑
摘要:For intergration tests, always remember when you create a 'mass' you should aslo clean up the 'mass'. For example when you start the server, you need 阅读全文
posted @ 2017-09-20 01:20 Zhentiw 阅读(207) 评论(0) 推荐(0) 编辑
摘要:We have express app: As you can see, we wrap Express App into a function 'startServer' and export it as default export. The return value of this funct 阅读全文
posted @ 2017-09-19 22:33 Zhentiw 阅读(382) 评论(0) 推荐(0) 编辑
摘要:Stateful session management: Store session which associate with user, and store in the menory on server. Sign Up: Password validation: Random bytes ge 阅读全文
posted @ 2017-09-19 01:52 Zhentiw 阅读(314) 评论(0) 推荐(0) 编辑
摘要:In this lesson we will find out how to serve static assets (images, css, stylesheets, etc.) with Express. We will go over writing initial boilerplate 阅读全文
posted @ 2017-09-19 00:48 Zhentiw 阅读(255) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
点击右上角即可分享
微信分享提示