Skip to content

Instantly share code, notes, and snippets.

View yunusemre's full-sized avatar
🏠
home, home..

Yunus Emre Tatar yunusemre

🏠
home, home..
View GitHub Profile
@yunusemre
yunusemre / step0.Dockerfile
Created February 15, 2021 18:33 — forked from ismailbaskin/step0.Dockerfile
Node.js Dockerfile Evolution
FROM node:12
WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN npm run build
CMD [ "npm", "start" ]
@yunusemre
yunusemre / errorHandler.js
Created November 29, 2019 18:18 — forked from saqueib/errorHandler.js
Global error handling using axios interceptor for http calls http://www.qcode.in/api-error-handling-in-vue-with-axios
import axios from 'axios'
import toast from './toast'
function errorResponseHandler(error) {
// check for errorHandle config
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) {
return Promise.reject(error);
}
// if has response show the error