Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
node_modules |
const reg = new RegExp('(/' + namespace + '/)(.*)'); | |
const partUrl = url.split(reg)[2]; |
When using findOrFail()
or findOneOrFail()
from typeORM, a 500 error is returned if there is no entity (EntityNotFoundError).
To make it returns a 404, use an exception filter as described in https://docs.nestjs.com/exception-filters .
file /src/filters/entity-not-found-exception.filter.ts
const load = async (i18n, component) => { | |
const messages = () => import('~/i18n/translations/' + i18n.locale + '/components/' + component); | |
const componentMessages = await messages(); | |
i18n.setLocaleMessage(i18n.locale, { | |
...i18n.messages[i18n.locale], | |
testComponent: componentMessages.default | |
}); |
const purgecss = require('@fullhuman/postcss-purgecss')({ | |
// Specify the paths to all of the template files in your project | |
content: [ | |
'./src/**/*.html', | |
'./src/**/*.jsx', | |
// etc. | |
], | |
// Include any special characters you're using in this regular expression |
Git — система контроля версий (файлов). Что-то вроде возможности сохраняться в компьютерных играх (в Git эквивалент игрового сохранения — коммит).
Любой файл в папке существующего репозитория может находиться или не находиться под версионным контролем (отслеживаемые и неотслеживаемые).
import Vue from 'vue' | |
import VueUniversalModal, { ModalWrapper } from 'vue-universal-modal' | |
Vue.use(VueUniversalModal); | |
Vue.component('ModalWrapper', ModalWrapper); | |
// this.$modals.open({ | |
// component: { | |
// template: '<div>something like a DOM or the global vue component</div>' | |
// }, |