Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Criptografia e User Roles #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions semana19/criptografia/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "aula-back-arquitetura",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "ts-node-dev ./src/index.ts",
"build": "tsc"
},
"author": "",
"license": "ISC",
"dependencies": {
"@types/express": "4.17.0",
"@types/jsonwebtoken": "^8.3.9",
"@types/knex": "^0.16.1",
"@types/node": "^13.7.7",
"@types/uuid": "^7.0.3",
"dotenv": "^8.2.0",
"express": "4.17.0",
"jsonwebtoken": "^8.5.1",
"knex": "^0.21.1",
"mysql": "^2.18.1",
"ts-node": "^8.6.2",
"ts-node-dev": "^1.0.0-pre.44",
"typescript": "^3.8.3",
"uuid": "^8.0.0"
}
}
18 changes: 18 additions & 0 deletions semana19/criptografia/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import express, { Request, Response } from "express";
import dotenv from "dotenv";
import { AddressInfo } from "net";

dotenv.config();

const app = express();

app.use(express.json());

const server = app.listen(process.env.PORT || 3003, () => {
if (server) {
const address = server.address() as AddressInfo;
console.log(`Server is running in http://localhost:${address.port}`);
} else {
console.error(`Failure upon starting server.`);
}
});
11 changes: 11 additions & 0 deletions semana19/criptografia/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"outDir": "./build" /* Redirect output structure to the directory. */,
"rootDir": "./" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
"strict": true /* Enable all strict type-checking options. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
}