随笔分类 - [Whole Web]
摘要:The advantage of RS256 over HS256 is RS256 no longer need to share the secret key between client and server side. To create a token, we need to privat
阅读全文
摘要:The advantages of JWT over traditional session based validation is: it effectively removing all authentication logic from both our codebase and our da
阅读全文
摘要:Once user sign up, we store the user data inside cookie in the broswer and also keep a memory copy in the server. If next time, user refresh the page,
阅读全文
摘要:For the whole signup process. we need to Hash the password to create a password digest Store the user's info and password digest into db Create a rand
阅读全文
摘要:After reading the blog, the main take away from there is: "Never send back JOSN array to the client side, it is easy to be hijacked, using JSON object
阅读全文
摘要:Which hash algorithom to choose for new application: https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet Argon2[*7] is the winner of the pass
阅读全文
摘要:We cannot directly store user password in the database. What need to do is creating a hashed & salted string which reperstanting the user password. Th
阅读全文
摘要:Require those libs:var jade = require('gulp-jade'),browserify = require('gulp-browserify'),uglify = require('gulp-uglify'),gulpif = require('gulp-if')...
阅读全文
摘要:Copy file:gulp.task('copy-image', function() { gulp.src('./public/images/**/*').pipe(gulp.dest('./build/assets/images'));});gulp.task('copy-app-js'...
阅读全文
摘要:In this lesson, we will learn how tasks work in Gulp. We will talk about how to define a task and what each parameter in the definition does. We will ...
阅读全文
摘要:We will have accomplished a few goals, the first goal being that changes to our source files will automatically be detected and a new build will be ki...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:Aadd watch to the config.json file:{ "apps": [{ "name": "App1", "script": "app1/server.js", "log_file": "log/app1.log", "error_file": "lo...
阅读全文
摘要:Add config for app's log and error log for PM2.{ "apps": [{ "name": "App1", "script": "app1/server.js", "log_file": "log/app1.log", "erro...
阅读全文
摘要: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 ...
阅读全文
摘要:ng-html2js takes .html templates and converts them into strings stored in AngularJS's template cache. This allows you to bundle all of your templates ...
阅读全文
摘要: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 ...
阅读全文
摘要:npm runallows you to configure scripts inside of yourpackage.jsonfile which can access locally installed node packages. If you're comfortable with thi...
阅读全文
摘要:PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reloa...
阅读全文