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

OSCAR PLAZA PORTALES #2

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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist/*.ts
dist/*.map
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DATABASE=eshop
CLEARDB_DATABASE_URL=mysql://root@localhost:3306/eshop
PORT=3000
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# compiled output
# /dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:16

RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app

WORKDIR /home/node/app

COPY package*.json ./

USER node

RUN npm ci --only=production
COPY --chown=node:node ./dist ./dist


# COPY --chown=node:node . .

CMD ["npm","run","start:prod"]
2 changes: 2 additions & 0 deletions dist/app.module.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare class AppModule {
}
38 changes: 38 additions & 0 deletions dist/app.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/app.module.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dist/auth/auth.controller.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { AuthService } from './auth.service';
import { LoginUserDto } from './dto/login.dto';
export declare class AuthController {
private authService;
constructor(authService: AuthService);
login(loginDto: LoginUserDto): Promise<{
access_token: string;
}>;
}
43 changes: 43 additions & 0 deletions dist/auth/auth.controller.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/auth/auth.controller.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/auth/auth.module.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare class AuthModule {
}
35 changes: 35 additions & 0 deletions dist/auth/auth.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/auth/auth.module.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions dist/auth/auth.service.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { JwtService } from '@nestjs/jwt';
import { LoginUserDto } from '../auth/dto/login.dto';
import { UserService } from '../user/user.service';
export declare class AuthService {
private userService;
private jwtService;
constructor(userService: UserService, jwtService: JwtService);
validateUser(name: string, pass?: string): Promise<any>;
login(user: LoginUserDto): Promise<{
access_token: string;
}>;
}
60 changes: 60 additions & 0 deletions dist/auth/auth.service.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/auth/auth.service.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/auth/dto/login.dto.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export declare class LoginUserDto {
readonly name: string;
readonly password: string;
}
28 changes: 28 additions & 0 deletions dist/auth/dto/login.dto.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/auth/dto/login.dto.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/auth/roles/role.enum.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export declare enum Role {
User = "cliente",
Admin = "admin"
}
9 changes: 9 additions & 0 deletions dist/auth/roles/role.enum.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/auth/roles/role.enum.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions dist/auth/roles/roles.decorators.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Role } from './role.enum';
export declare const ROLES_KEY = "roles";
export declare const Roles: (...roles: Role[]) => import("@nestjs/common").CustomDecorator<string>;
8 changes: 8 additions & 0 deletions dist/auth/roles/roles.decorators.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/auth/roles/roles.decorators.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading