From 2575aaf2ff4efa02cca226b5b6565f3a3c341429 Mon Sep 17 00:00:00 2001 From: "natthawut.bk93" Date: Sat, 10 Oct 2020 15:41:01 +0700 Subject: [PATCH] Initial commit --- .gitattributes | 2 ++ .vscode/sftp.json | 22 ++++++++++++++++++++++ bin/www | 2 +- config/config.json | 25 +++++++++++-------------- package.json | 2 +- 5 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 .gitattributes create mode 100644 .vscode/sftp.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.vscode/sftp.json b/.vscode/sftp.json new file mode 100644 index 0000000..688914e --- /dev/null +++ b/.vscode/sftp.json @@ -0,0 +1,22 @@ +{ + "name" : "express-kt-api", + "protocol": "sftp", + "host": "ftp.55186620-46-20190503114132.webstarterz.com", + "username": "cp277207", + "password": "1~PReX~e9[@T", + "remotePath": "/home2/cp277207/public_html/bank/express-ecom/", + "downloadOnOpen": true, + "uploadOnSave": true, + "watcher": { + "files": "css/*{min.css,css,map,css.map}", + "autoUpload": true, + "autoDelete": true + }, + "ignore": [ + ".vscode", + "node_modules", + ".git", + ".DS_Store", + "vendor" + ] + } \ No newline at end of file diff --git a/bin/www b/bin/www index 516a148..9eb2f57 100644 --- a/bin/www +++ b/bin/www @@ -12,7 +12,7 @@ var http = require('http'); * Get port from environment and store in Express. */ -var port = normalizePort(process.env.PORT || '3000'); +var port = normalizePort(process.env.PORT || '8080'); app.set('port', port); /** diff --git a/config/config.json b/config/config.json index 701c1a4..a20dcce 100644 --- a/config/config.json +++ b/config/config.json @@ -1,26 +1,23 @@ { - "developmsent": { - "username": "root", - "password": "root", - "database": "node_api_ecom_sequelize", - "host": "127.0.0.1", - "dialect": "mysql" - }, "development": { - "storage": "./app.db", - "dialect": "sqlite" + "username": "cp277207", + "password": "1~PReX~e9[@T", + "database": "cp277207_bank", + "host": "127.0.0.1", + "dialect": "mysql", + "logging": true }, "test": { "username": "root", - "password": "root", - "database": "node_ecom_sequelize", + "password": null, + "database": "database_test", "host": "127.0.0.1", - "dialect": "sqlite3" + "dialect": "mysql" }, "production": { "username": "root", - "password": "root", - "database": "node_ecom_sequelize", + "password": null, + "database": "database_production", "host": "127.0.0.1", "dialect": "mysql" } diff --git a/package.json b/package.json index 9edfa8d..f530e4e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "start": "nodemon ./bin/www" }, "dependencies": { - "bcrypt": "^3.0.2", + "bcrypt": "^5.0.0", "cookie-parser": "~1.4.3", "cors": "^2.8.5", "debug": "~2.6.9",