-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teste deploy na vercel - 11 - Back-end.
- Loading branch information
1 parent
103f46f
commit 104911a
Showing
29 changed files
with
3,157 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ typings/ | |
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
# dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"use strict"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
|
||
// src/adapters/BcryptAdapter/BcryptAdapter.ts | ||
var BcryptAdapter_exports = {}; | ||
__export(BcryptAdapter_exports, { | ||
BCryptAdapter: () => BCryptAdapter | ||
}); | ||
module.exports = __toCommonJS(BcryptAdapter_exports); | ||
var bcrypt = __toESM(require("bcryptjs")); | ||
var import_process = require("process"); | ||
var BCryptAdapter = class { | ||
async hashEncrypt({ password }) { | ||
const rounds = Number(import_process.env.BCRYPT_COST); | ||
const salt = await bcrypt.genSalt(rounds); | ||
const result = await bcrypt.hash(password, salt); | ||
return result; | ||
} | ||
async compareHash({ password, passwordDatabase }) { | ||
const result = await bcrypt.compare(password, passwordDatabase); | ||
return result; | ||
} | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
BCryptAdapter | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
|
||
// src/adapters/IBcryptAdapter.ts | ||
var IBcryptAdapter_exports = {}; | ||
module.exports = __toCommonJS(IBcryptAdapter_exports); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
|
||
// src/adapters/IJwtAdapter.ts | ||
var IJwtAdapter_exports = {}; | ||
module.exports = __toCommonJS(IJwtAdapter_exports); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
|
||
// src/adapters/JwtAdapter/JwtAdapter.ts | ||
var JwtAdapter_exports = {}; | ||
__export(JwtAdapter_exports, { | ||
JwtAdapter: () => JwtAdapter | ||
}); | ||
module.exports = __toCommonJS(JwtAdapter_exports); | ||
var import_process = require("process"); | ||
var jwt = __toESM(require("jsonwebtoken")); | ||
var JwtAdapter = class { | ||
generateToken({ id }) { | ||
const expiresIn = 1647456e3; | ||
const token = jwt.sign( | ||
{ | ||
id | ||
}, | ||
import_process.env.JWT_KEY, | ||
{ | ||
expiresIn | ||
} | ||
); | ||
return token; | ||
} | ||
getTokenData({ token }) { | ||
const payload = jwt.verify(token, import_process.env.JWT_KEY); | ||
const result = { | ||
id: payload.id | ||
}; | ||
return result; | ||
} | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
JwtAdapter | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
|
||
// src/config/knexfile.ts | ||
var knexfile_exports = {}; | ||
__export(knexfile_exports, { | ||
default: () => knexfile_default | ||
}); | ||
module.exports = __toCommonJS(knexfile_exports); | ||
var import_process = require("process"); | ||
var configKnex = { | ||
development: { | ||
client: "pg", | ||
connection: import_process.env.DATABASE_URL, | ||
useNullAsDefault: true, | ||
searchPath: ["knex", "public"], | ||
migrations: { | ||
tableName: "knex_migrations_todo", | ||
extension: "ts" | ||
}, | ||
seeds: { | ||
tableName: "knex_seeds_todo", | ||
extension: "ts" | ||
}, | ||
pool: { | ||
min: 2, | ||
max: 10 | ||
} | ||
}, | ||
production: { | ||
client: "pg", | ||
connection: import_process.env.DATABASE_URL, | ||
useNullAsDefault: true, | ||
searchPath: ["knex", "public"], | ||
migrations: { | ||
tableName: "knex_migrations_todo", | ||
extension: "ts" | ||
}, | ||
seeds: { | ||
tableName: "knex_seeds_todo", | ||
extension: "ts" | ||
}, | ||
pool: { | ||
min: 2, | ||
max: 10 | ||
} | ||
} | ||
}; | ||
var knexfile_default = configKnex; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = {}); |
Oops, something went wrong.
104911a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
api-modern-to-do-list-2bjl – ./back-end
api-modern-to-do-list-2bjl-git-main-gabrielss187.vercel.app
api-modern-to-do-list-2bjl.vercel.app
api-modern-to-do-list-2bjl-gabrielss187.vercel.app
104911a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
modern-to-do-list – ./front-end
modern-to-do-list.vercel.app
modern-to-do-list-gabrielss187.vercel.app
modern-to-do-list-git-main-gabrielss187.vercel.app