study / okdevtv star
허광남 허광남 01-27
node update
@88aec5becf3811958659c3fc52649cbdfa436700
.gitignore
--- .gitignore
+++ .gitignore
@@ -18,7 +18,6 @@
 build
 class
 classes
-credentials.json
 node_modules
 npm-debug.log
 package-lock.json
public/md/list.md
--- public/md/list.md
+++ public/md/list.md
@@ -209,7 +209,6 @@
 ./nginx/nginx.md
 ./nginx/php-fpm.md
 ./nodejs/async.md
-./nodejs/credentials.json.sample
 ./nodejs/debug.md
 ./nodejs/express-session.md
 ./nodejs/gmail-box.js
public/md/nodejs/express-session.md
--- public/md/nodejs/express-session.md
+++ public/md/nodejs/express-session.md
@@ -10,10 +10,10 @@
 ## example setting & use
 
 ```js
-var session = require('express-session')
+const session = require('express-session')
 
-var app = express();
-var sess = {
+const app = express();
+const sess = {
   secret: 'keyboard cat',
   resave: true,
   saveUninitialized: true,
public/md/nodejs/knex.md
--- public/md/nodejs/knex.md
+++ public/md/nodejs/knex.md
@@ -11,7 +11,7 @@
 ## init
 
 ```
-var knex = require('knex')({
+const knex = require('knex')({
   client: 'mysql',
   connection: {
     host : '127.0.0.1',
public/md/nodejs/multer.md
--- public/md/nodejs/multer.md
+++ public/md/nodejs/multer.md
@@ -2,11 +2,11 @@
 * https://github.com/expressjs/multer
 
 ```
-var express = require('express')
-var multer  = require('multer')
-var upload = multer({ dest: 'uploads/' })
+const express = require('express')
+const multer  = require('multer')
+const upload = multer({ dest: 'uploads/' })
 
-var app = express()
+const app = express()
 
 app.post('/profile', upload.single('avatar'), function (req, res, next) {
   // req.file is the `avatar` file
@@ -18,7 +18,7 @@
   // req.body will contain the text fields, if there were any
 })
 
-var cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
+const cpUpload = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
 app.post('/cool-profile', cpUpload, function (req, res, next) {
   // req.files is an object (String -> Array) where fieldname is the key, and the value is array of files
   //
@@ -28,4 +28,4 @@
   //
   // req.body will contain the text fields, if there were any
 })
-```
(No newline at end of file)
+```
Add a comment
List